Not exacly what he means. He meant an action definition. And then you just initialize it once and have a repeat forever with a wait at the end of the set with the period you want it to check.
Not exacly what he means. He meant an action definition. And then you just initialize it once and have a repeat forever with a wait at the end of the set with the period you want it to check.
In the Action Definition, could I check off Loop under the Options instead of adding a Repeat Forever action?
What would the Parameters be, if any?
Since there will be more than one player, will I need a parameter for Player, Unit, and each movement key variables such as WASD? Then run this Action Definition when the Map Initialization ends or whenever the actual game play that requires the unit to be moving begins?
You're checking the aggro range right. The loop check just means that break actions can be used in the definition. But you don't need them. You also don't need parameters. Just make it so that it continuously runs through each player and their unit, to check if their flash light is on, if it is then check to see if there are enemies around them in a certain radius, and then if there are order them to attack the player unit. And then a a wait of 0.0625 secs (smallest amount of time possible between loops).
Because with an action definition you can can it in one trigger and not worry about it the rest of the game. Also you need a wait action in there or you will have a problem.
He could also prob just have a behavior on the unit too huh, and then just have a search effect that causes other units nearby to auto attack any units with that behavior. Prob doesn't need the damage effect then.
Easy enough. Give all of the playerUnit a behavior that does a search area, but my problem is the torch variable needs to be set to true in order to have that increased aggro range.
If I knew how to do a threaded definition I would do it, but I'll look for a tutorial or something later today.
Update
Is this what you mean?
Not exacly what he means. He meant an action definition. And then you just initialize it once and have a repeat forever with a wait at the end of the set with the period you want it to check.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
In the Action Definition, could I check off Loop under the Options instead of adding a Repeat Forever action?
What would the Parameters be, if any?
Since there will be more than one player, will I need a parameter for Player, Unit, and each movement key variables such as WASD? Then run this Action Definition when the Map Initialization ends or whenever the actual game play that requires the unit to be moving begins?
You're checking the aggro range right. The loop check just means that break actions can be used in the definition. But you don't need them. You also don't need parameters. Just make it so that it continuously runs through each player and their unit, to check if their flash light is on, if it is then check to see if there are enemies around them in a certain radius, and then if there are order them to attack the player unit. And then a a wait of 0.0625 secs (smallest amount of time possible between loops).
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
So like this? If yes, then why even do an Action Definition? Or was that for the movement?
Because with an action definition you can can it in one trigger and not worry about it the rest of the game. Also you need a wait action in there or you will have a problem.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@admielke: Go
You dont need a periodic event or an infinite looping thread.
What you do it...
at this point you check to see how the targeted unit belongs to and so on
easy and no infite loops
This way logic only runs when units are actually in range to it, with out any looping.
He could also prob just have a behavior on the unit too huh, and then just have a search effect that causes other units nearby to auto attack any units with that behavior. Prob doesn't need the damage effect then.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Easy enough. Give all of the playerUnit a behavior that does a search area, but my problem is the torch variable needs to be set to true in order to have that increased aggro range.
Have it so when the torch is turned on the unit gets the behavior, and when it's turned off it gets removed.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)