Warcraft III resources & community, 2003–2006 · archived

Trigger Problem

4 posts
#1

Trigger Problem

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:
#2
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. :?
#3
N00byStanceI 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 =)
#4
=D Huh I mean: to stop researching you must replace researching unit with unit of the same kind, just to "reset". Researching building is replaced with the same building, but then it is NOT researching, as no new building is.

But, as you said, you got it ;)

GL!