Code
def Hyper():
#This line just defines the word Hyper as a function. Here is the function Hyper:
Trigger(1)
Always()
for Timer in range(63): # Timer will loop through the numbers 0,1,2...,61,62 (which is 63 numbers in total, so it loops 63 times)
Wait(0)
#The above 2 lines writes out Wait(0) 63 times
PreserveTrigger()
# The loop below is pretty much the same as the above for loop but demonstrates that you don't have to start at the loop at 0. The variable Loop will loop through the values 1,2,3 (3 numbers)
# Actually this line is equivalent to doing "for Loop in (1,2,3):"
for Loop in range(1,4):
Hyper()
#The above 2 lines fires the function hyper three times
#This line just defines the word Hyper as a function. Here is the function Hyper:
Trigger(1)
Always()
for Timer in range(63): # Timer will loop through the numbers 0,1,2...,61,62 (which is 63 numbers in total, so it loops 63 times)
Wait(0)
#The above 2 lines writes out Wait(0) 63 times
PreserveTrigger()
# The loop below is pretty much the same as the above for loop but demonstrates that you don't have to start at the loop at 0. The variable Loop will loop through the values 1,2,3 (3 numbers)
# Actually this line is equivalent to doing "for Loop in (1,2,3):"
for Loop in range(1,4):
Hyper()
#The above 2 lines fires the function hyper three times
Another thing is using a parameter in the Hyper function to say how many times to add the trigger would make it a little easier to use the Hyper function in new trigger files:
Code
def Hyper(times):
for Loop in range(times):
Trigger(1)
Always()
for Timer in range(63):
Wait(0)
PreserveTrigger()
Hyper(3)
for Loop in range(times):
Trigger(1)
Always()
for Timer in range(63):
Wait(0)
PreserveTrigger()
Hyper(3)
Anyway, you're code is perfectly fine, these are just suggestions to help you be more efficient by having to type less. Thanks again for showing your experiments with it!
[img=http://www.modcrafters.com/images/sig_logo.png]
We mod Starcraft.
PyMS (Local/Forums) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher
BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local)
We mod Starcraft.
PyMS (Local/Forums) | FNTGen | ProTRG (Local) | LocUnlock | BWAI Launcher
BroodWarAI.com (Forums) | StarCraft: Team Fortress (Forums/Local)