Author Topic:  [How to] Make Scripts  (Read 25477 times)

0 Members and 1 Guest are viewing this topic.

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #15 on: April 08, 2014, 10:08:15 PM »
:) cool
have you used an 'add/remove block' script to make the arcade players safe from interference yet?
sure they'd all appreciate it

see some plans for that & other ideas here http://totalminerforums.net/index.php?topic=4807.msg58749#msg58749
what do u mean?im confused




muD

  • Legendary Member
  • *****
  • Posts: 1177
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members Day 1 w/25+ posts (4/12/13) 2 years on site Former MotM winners 1 year on site
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #16 on: April 08, 2014, 10:20:55 PM »

stewydeadmike

  • Elite Member
  • *****
  • Posts: 665
  • ( ゚ヮ゚)/
  • Awards 1 year on site
    • View Profile
    • Awards
  • Xbox: stewydead mike
  • PSN: don't have one
  • Steam: stewydeadmike
Re: Scripts -[How to]-
« Reply #17 on: April 08, 2014, 10:49:15 PM »
thanks all my chests can be full so I dont have to constantly refill them  :D

Pringle

  • Legendary Member
  • *****
  • Posts: 1183
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13) Former MotM winners
    • View Profile
    • Awards
  • Xbox: pringle2009
Re: Scripts -[How to]-
« Reply #18 on: April 08, 2014, 11:26:24 PM »
This topic just completly thought me it all
https://m.

Littleman9Mew2

  • Member
  • ***
  • Posts: 247
  • I AM MEWTWO!
  • Awards 1 year on site
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #19 on: April 09, 2014, 12:18:26 AM »
hey muD, you should add a section for the wireless transmitter and receiver blocks.
could help alot for some of those inventive people!
and maybe add something about component pasting!
Check out my Youtube channel!

P.S.
I'm baaack!

muD

  • Legendary Member
  • *****
  • Posts: 1177
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members Day 1 w/25+ posts (4/12/13) 2 years on site Former MotM winners 1 year on site
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #20 on: April 09, 2014, 01:25:37 AM »
hey muD, you should add a section for the wireless transmitter and receiver blocks.
could help alot for some of those inventive people!
and maybe add something about component pasting!
Yup, will get to them
______

section for Delays & Notifications added to OP

Powerlord

  • Jr. Member
  • **
  • Posts: 20
  • fafa
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #21 on: April 09, 2014, 01:32:00 AM »
Interesting guide, should help newcomers a lot.
agagag

The Gold Knight

  • Legendary Member
  • *****
  • Posts: 1092
  • My Forgeplex is better ;)
  • Awards 3 years on site Site art contributions/TPs in-game/Contest winners 5 years on site Top contributors to the forum downloads. 4 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Insert Clickbait Title Here!
    • Awards
  • Other: 何
Re: Scripts -[How to]-
« Reply #22 on: April 09, 2014, 02:16:39 AM »
Question: In the notify script, what does the local/global part of the script do?

muD

  • Legendary Member
  • *****
  • Posts: 1177
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members Day 1 w/25+ posts (4/12/13) 2 years on site Former MotM winners 1 year on site
    • View Profile
    • Awards
Re: Scripts -[How to]-
« Reply #23 on: April 09, 2014, 02:37:28 AM »
Question: In the notify script, what does the local/global part of the script do?
I don't know.
I presume Local limits the notifications to within a certain distance of either the script block or admin running it.. & Global will notify everyone in the world but that is guesswork.
i tried testing in local split-screen but notifications pop up regardless of distance, which was expected..
Required 2 people on separate machines to find the distance a local notification was sent, if that is what it is..
i also want to find out

Jaz

  • Supreme Member
  • *****
  • Posts: 2989
  • - Jaz
  • Awards 5 years on site Donated a giveaway prize. (Must be a prize of cash value.) Awarded to exemplary forum members Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners 4 years on site 3 years on site 2 years on site 1 year on site
    • View Profile
    • The Useless Web
    • Awards
  • Xbox: Jaz the MAN 2
  • PSN: Jaz_the_MAN_2
  • Steam: Jaz the MAN 2
Re: -=[How to]=- Make Scripts
« Reply #24 on: April 09, 2014, 03:38:24 AM »
Once again, great topic. Thanks for writing it up. Well deserving of a sticky
i agree with Bob, this is one of my favourite topics if not it is my fav :D XD

Tom

  • Global Moderator
  • Legendary Member
  • ******
  • Posts: 1373
  • "Witness me! I live, I die, I live again."
  • Awards 1 year on site Former MotM winners 3 years on site I AM THE LAW! 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Awards
Re: -=[How to]=- Make Scripts
« Reply #25 on: April 09, 2014, 05:40:51 AM »
Question for you Mud,  any look creating a Looping Scripts? . So far attempts have failed :P either I'm messing up somewhere along the line or they aren't designed for to loop.


(smacks you)

being stupid is gona start to hurt around here.

The White Rabbit

  • Legendary Member
  • *****
  • Posts: 1468
  • Are you a solo builder too?
  • Awards 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Awards
  • Xbox: Nobodies56
  • PSN: A_Blessed_Potato
  • Steam: Ray
Re: -=[How to]=- Make Scripts
« Reply #26 on: April 09, 2014, 05:47:10 AM »
Question for you Mud,  any look creating a Looping Scripts? . So far attempts have failed :P either I'm messing up somewhere along the line or they aren't designed for to loop.

I tried that however it failed badly so I just created a script of copy and paste so much that I simply lost the will to work on it xD

 
Thanks GK for the new sig it looks great!
 
You may be able to teach a chimp to dance, but will he dance for your tune?

Tom

  • Global Moderator
  • Legendary Member
  • ******
  • Posts: 1373
  • "Witness me! I live, I die, I live again."
  • Awards 1 year on site Former MotM winners 3 years on site I AM THE LAW! 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Awards
Re: -=[How to]=- Make Scripts
« Reply #27 on: April 09, 2014, 05:53:11 AM »
I tried that however it failed badly so I just created a script of copy and paste so much that I simply lost the will to work on it xD
I tried bypassing Script [name] function because that didn't allow for looping by using a circuit but it would not repower the script. For some reason it will not execute the script again, without physically flicking the switch of the original script block. I'm gonna try script commands to see if I can get it to work.


(smacks you)

being stupid is gona start to hurt around here.

The White Rabbit

  • Legendary Member
  • *****
  • Posts: 1468
  • Are you a solo builder too?
  • Awards 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Awards
  • Xbox: Nobodies56
  • PSN: A_Blessed_Potato
  • Steam: Ray
Re: -=[How to]=- Make Scripts
« Reply #28 on: April 09, 2014, 05:55:50 AM »
I was working with script commands and kept drawing blanks and I really need this loop to make my airships fly in the distance :(

 
Thanks GK for the new sig it looks great!
 
You may be able to teach a chimp to dance, but will he dance for your tune?

muD

  • Legendary Member
  • *****
  • Posts: 1177
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members Day 1 w/25+ posts (4/12/13) 2 years on site Former MotM winners 1 year on site
    • View Profile
    • Awards
Re: -=[How to]=- Make Scripts
« Reply #29 on: April 09, 2014, 07:45:37 AM »
Question for you Mud,  any look creating a Looping Scripts? . So far attempts have failed :P either I'm messing up somewhere along the line or they aren't designed for to loop.
Yes I have made a couple of looping scripts, but there is a mech in place to stop recursive scripts

Quote from: Craig
I've also added a Script [scriptName] command, which allows you to execute another script inside a script. This allows you to write modular scripts, with each one doing only a specific task, and then you can call them as you need them (string them together) allowing for primitive script reuse.

Note the Script command will cause nested execution. The SetSwitch command also has the potential to do this, because the switch may activate another script as part of it's circuit.

In order to stop both excessive ram use and infinitely recursing scripts (script A calls script B which calls script A which calls script B), there is a limit of 20 nested scripts. Once the nested limit is reached, a script cannot execute another script (directly or indirectly) so eventually the nested scripts will unwind.
Source

can make simple loopers like so;

1: Script [1]
2: Commit
3: Wait [1000]
4: Script [2]
5: Commit
6: Wait [1000]
7: Script [1]
8: Commit
9: Wait [1000]
10: Script [2]
11: Commit

repeat as necessary, but there is a limit then it can't be looped by switches, buttons, scripts or anything.. will need a manual reboot if no one can find a way round it
« Last Edit: April 09, 2014, 08:34:21 AM by muD »