Help on timed trigger spell

Do you need World Editor help? Ask here!
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
samtre
Posts: 82
Joined: Thu Nov 27, 2008 6:43 am

Help on timed trigger spell

Unread post 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
Attachments
Arrow Arena.w3x
(744.04 KiB) Downloaded 390 times
Last edited by samtre on Sat Feb 21, 2009 8:38 am, edited 1 time in total.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Help on timed trigger spell

Unread post 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.
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 125 guests