[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 07-16-2012, 09:45 PM   #1 (permalink)
Registered User Blackair
User
 
Blackair's Avatar
 
Join Date: Aug 2011
Posts: 81
Blackair has little to show at this moment (6)
Exclamation buff /effect trigger

hi everyone
i tried to use this trigger to add a freeze effect and slowing down enemy units with buff Cold of cone

what wrong with this trigger and why it wont work?
Cone of Cold buff
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Cone of Cold ) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set (Picked unit) movement speed to ((Current movement speed of (Picked unit)) - ((Current movement speed of (Picked unit)) x 0.60))
Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Cone of Cold ) Equal to False
Then - Actions
Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
Else - Actions
and how can i fix it? i need the pros guide!
Blackair is offline  
Old 07-17-2012, 02:13 AM   #2 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,684
mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)mckill2009 is a splendid one to behold (942)
I think you should do;
Unit - Set (Picked unit) movement speed to ((Default movement speed of (Picked unit)) - ((Default movement speed of (Picked unit)) x 0.60))
but that is bad also, coz you're checking everytime, so you should put a condition to run it just one time...

BTW:
- your group leaks
- This is useless " ((Picked unit) has buff Cone of Cold ) Equal to False" since it will filter the ONLY the unit who has that buff
- Picking units in playable map area to check buff using a looper 1.0/sec is bad coz you need to off this trigger somehow

SUGGETIONS:
- Make a group variable, if this is a spell, add the target to that group
- PIck all units in THAT GROUP and put conditions like you mentioned above, this way it will pick units with or w/o buff
- If no buff detecetd, remove unit from group

EDIT; something like this
Cone of Cold buff
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (YOUR_GROUP) and do (Actions)
Loop - Actions
If - Conditions ((Picked unit) has buff Cone of Cold ) Equal to False
Then - Actions
Animation - Change (Picked unit)'s vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
Custom script: call GroupRemoveUnit(udg_YOUR_GROUP, GetEnumUnit())
Custom script: if IsUnitGroupEmptyBJ(udg_YOUR_GROUP) then
Trigger - Turn Off this trigger
Custom script: endif
Else - Actions
__________________
Maps Systems AI Systems

I believe in miracles as I've seen them all come true
mckill2009 is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 11:12 PM.




Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle