• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

What is wrong ?

Status
Not open for further replies.
Level 7
Joined
Feb 4, 2005
Messages
289
It looks simple:

Unit - A unit Starts the effect of an ability

(Ability being cast) Equal to Cluster Rockets

Unit Group - Pick every unit in (Units within 80.00 of (Target point of ability being cast)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) is A Hero) Equal to False
((Picked unit) is alive) Equal to True
Then - Actions
Unit - Change ownership of (Picked unit) to (Owner of (Casting unit)) and Change color
Unit - Change color of (Picked unit) to Green
Wait 10.00 seconds
Unit - Change ownership of (Picked unit) to (Previous owner) and Change color
Else - Actions
Do nothing

It changes the units in the area to owner of casting unit, then it doesnt change them back to previous owner. Corrections ?
 
Level 5
Joined
Nov 21, 2005
Messages
100
It'll forget who the previous owner was during that time. You'd have to use variables, and that would only work if you're certain it won't be cast again during these 10 seconds.

It's only a matter of time before someone says JASS
 
Status
Not open for further replies.
Top