HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Another Trigger Question

02-15-2004, 03:44 AM#1
DarkBasilisk
Ok i've gone over the trigger and i can't figure out whats wrong, its similar to triggers i've used before so i can't figure out why it doesn't work? Can anyone tell me whats wrong with this?

Events
Unit- A unit begins training a unit
Conditions
Marine equal to type of trained unit
Actions
If All (Conditions) are true then do (Actions) else do (Else Actions)
If-Conditions
(Interger((Mana of (Triggering unit)))) Greater than or equal to 75
Then-Actions
Unit - Set mana of triggering unit to ((Mana of (Triggering unit)) - 75.00)
Else-Actions
Unit- Remove (Trained Unit) from the game

The problem is that it won't subtract the mana from the unit building the Marine, nor will it remove the marine if the unit training it does not have enough mana. What's wrong?
02-15-2004, 04:08 AM#2
Newhydra
Try using the specific event response rather than the general one..."unit doing the training" instead of triggering unit. Assuming it exists. I'm not infront of the editor atm so I can't tell you if it does or not...

Also, you're saying "unit begins training" for the event. You can't remove a unit from the game which has not yet been created.
02-15-2004, 07:52 AM#3
DescX
...Answer to this should be pretty simple :). You might've already spotted it even...

Conditions
Marine equal to type of trained unit

Trained only works when the unit actually finishes (hence, trainED - past tense :)). Change it to Triggering Unit and the trigger should fire.

Also, a word of warning -

Else-Actions
Unit- Remove (Trained Unit) from the game

I don't think that stops the unit from being trained :)... I'll look into that bit in a second here and edit my post if I get it...
02-15-2004, 12:32 PM#4
DarkBasilisk
Ok guys now i know why it doesn't work but i can't figure out a way to do this properly. When a marine is trained i need to lower the mana of the unit training it by 75, if the unit doesn't have 75 mana to lower i need the marine to be canceled.