• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Requesting a Trigger Fix:

Status
Not open for further replies.
Level 4
Joined
Oct 4, 2005
Messages
65
Event-
Unit - A unit Begins an upgrade

Conditon-
(Mana of (Triggering unit)) Less than or equal to 499.00

Action-
Unit - Order (Triggering unit) to Cancel

I am trying to make it so that a building called "Village" to not upgrade to another building (but it does anyways). Some reason this trigger does not fire up.
 
Level 9
Joined
Aug 27, 2004
Messages
471
If you're using meta-morph abilities, it wont cancel quick enough. Instead make the whole thing triggered:

Event
Unit - Begins upgrade

Condition
null

actions
if(Mana of (upgrading unit) <= 500)
then
DoNothing()
else
replace unit - blah blah, blah blah
endif


Sorry, didint have time to get the actual code, but you get the point yes?
 
Level 4
Joined
Oct 4, 2005
Messages
65
Okay, the trigger works, but now I can't upgrade when I have 500 mana.

The trigger is set to not allow the upgrade if its lower than 500 mana, if the building is 500, then it should be allowed to upgrade but it does not.
 
Status
Not open for further replies.
Top