HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Buildings and Mana.....

09-05-2003, 10:50 PM#1
Hunter0000
Well to keep it short and to the point I made a trigger that once a building is full heath(or built) it subtracts 5 mana every 2 seconds, but it wont touch the mana, is this a bug or am I an idiot?

Events
Time - Every 2.00 seconds of game time
Unit - A unit enters (Playable map area)
Conditions
(Mana of (Triggering unit)) Greater than or equal to 5.00
(Life of (Triggering unit)) Greater than or equal to 100.00
(Unit-type of (Triggering unit)) Equal to Wheat (Stage One)
Actions
Unit - Set life of (Triggering unit) to (((Mana of (Triggering unit)) - 5.00) + 1.00)

I then have a trigger so when it goes to 0 it changes, I know I could do this with a timer But I want to show the players the progress. Any ideas as to whats going on?
09-05-2003, 11:44 PM#2
Hunter0000
Anyone know? Anyone at all?
09-05-2003, 11:52 PM#3
Raptor--
when the event 'every 2 seconds' runs, it wont have a 'triggering unit'

since ur trigger operates under 2 events, when the unit first enters the map it will run, but since it is most likely under construction and its life isn't full it won't do anything to the mana

when the trigger is ran through the 2 second periodic, it doesn't actually know what the triggering unit is, since its being triggered by time, and not a unit
09-06-2003, 12:24 AM#4
Hunter0000
oh,oh I see thanks I didnt realize that 2 events meant or on default

EDIT: but then how is my trigger ever possible? is there a way to make it an and?
09-06-2003, 01:20 AM#5
bludragn
Yep, it is possible even with 1 trigger...

Quote:
Event:
Time - Every 2.00 seconds of game time

Condition:

Action:
Unit Group - Pick every unit in (Units of type Wheat) and do (Actions)
--If (All Conditions are True) then do (Then Actions) else do (Else Actions)
----If - (Life of (Picked Unit) Equal to (Max life of (Picked Unit))
----Then - Set mana of (Picked Unit) to (Mana of (Picked Unit)) - 5.00)
----Else - Do nothing
09-06-2003, 01:40 AM#6
Hunter0000
ok thx, but I decided to go with a timer then just give the player a msg when its rdy for harvest. Thanks for the help anway tho