- 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
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