• 🏆 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!

Trigger Problem

Status
Not open for further replies.
Level 8
Joined
Apr 14, 2004
Messages
481
Well I better explain what im trying to make my trigger do. When a Unit starts researching a specific upgrade, it checks if a different unit has 2500+ mana, and if it does continues with the research and deducts 2500 mana from the other unit. But if it doesnt, it sends a message to the player, and then forces him to select that unit and press cancel. But, atm, it wont force the player to press cancel....here is my trigger

Events
Unit - A unit Begins research

Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of MainBase[(Player number of (Owner of (Researching unit)))]) Greater than or equal to 2500.00
Or - Any (Conditions) are true
Conditions
(Researched tech-type) Equal to TechType2500[1]
(Researched tech-type) Equal to TechType2500[2]
(Researched tech-type) Equal to TechType2500[3]
(Researched tech-type) Equal to TechType2500[4]

Then - Actions
Unit - Set mana of MainBase[(Player number of (Owner of (Researching unit)))] to ((Mana of MainBase[(Player number of (Owner of (Researching unit)))]) - 2500.00)
Else - Actions
Game - Display to Player2500[(Player number of (Owner of (Researching unit)))] the text: (You only have + ((String((Mana of MainBase[(Player number of (Owner of (Researching unit)))]))) + |c007773FFexperiance|r, you need 2500.))
Game - Force (Owner of (Researching unit)) to press Escape/Cancel


Currently, it does everything right, exept for pressing cancel, is there a different action to stop the Building researching an upgrade?

Any help welcome :cry:
 
Level 8
Joined
Apr 14, 2004
Messages
481
N00byStance said:
I don't know, if your trigger works fine, leave it. If not, try replacing building which wants to research with the same building. I really don't know will it work, but it is only thing I can figure out now. :?

Good idea, I finaly understood what You just said, I will try it tomorrow when im back =)
 
Status
Not open for further replies.
Top