Page 1 of 1

Help on timed trigger spell

Posted: Fri Feb 20, 2009 6:07 am
by samtre
I've been making a spell that requires the game-time, but the trigger doesn't quite work.
Visage - 5% -> 30% evasion, harder to be seen at night.

All timed triggers and spells Events Time - Every 5.00 seconds of game time Conditions Actions Unit - Unpause all units -------- Visage -------- If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((In-game time of day) Greater than 18.00) or ((In-game time of day) Less than 6.00) Then - Actions Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Forsaken Hunter)) and do (Actions) Loop - Actions Set Vertex_Colour = (100.00 - (10.00 x (Real((Level of Visage for (Picked unit)))))) Animation - Change (Picked unit)'s vertex coloring to (Vertex_Colour%, Vertex_Colour%, Vertex_Colour%) with (5.00 x (Real((Level of Visage for (Picked unit)))))% transparency Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((In-game time of day) Less than 18.00) or ((In-game time of day) Greater than 6.00) Then - Actions Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Forsaken Hunter)) and do (Actions) Loop - Actions Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency Else - Actions

Re: Help on timed trigger spell

Posted: Fri Feb 20, 2009 6:51 am
by 3ICE
Attach a testmap with this trigger in it. You don't know how to post triggers properly.
And it is a lot easier to debug a trigger if it's live in the editor and not just dead text.
samtre wrote:I've been making a spell
That isn't a spell at all.

(Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Forsaken Hunter)) is wrong on many levels.
Use (Units of type Forsaken Hunter) instead.

And the second if block is stupid. Use the first if block's else clause instead.

EDIT: Wow... Why the hell are you recoloring the units every 5 seconds to the same color? This is painfully wrong! The event t_gam Game - The in-game time of day becomes Equal to 6.00 was not invented for fun... Use it!
Ouch.

EDIT2: And another event is required to handle new levels of the visage ability learnt during the night.