HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Something wrong...

01-03-2004, 10:24 PM#1
Eriond
This trigger doesn't heal the people inside my tents... Why, exactly? The tents have the load, cargo hold and cargo hold death abilities. So why isn't this trigger wroking to heal the people inside the tents?

Code:
Heal People In Tents
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is being transported) Equal to True
                    Then - Actions
                        Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 5.00)%
                    Else - Actions
                        Do nothing
01-03-2004, 10:33 PM#2
AllPainful
I KNOW "Devour Cargo" has a damage per second setting in the object editor, why not just use that and set its damage per second to a negative number (heals)

I THINK that your trigger isn't working because "Pick all Units" in area, and the units aren't in the map, so your trigger isn't picking them..



But if you really want to use triggers, try a
Code:
Pick all units in (playable map area)
  Do loop
     If 
       Picked unit is of type "Tent"
     Then 
       For integer a to [color=blue]8[/color] do
         Do loop
            add 5% to unit health of unit in cargo hold slot "integer a" of Picked unit

or something like that... but replace the 8 with how ever many slots your tents cargo hold has.
01-03-2004, 10:50 PM#3
FerretDruid
Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 5.00)%

Not sure if this is the problem line but maybe this would be better...

Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) x 1.05)
01-03-2004, 10:53 PM#4
AllPainful
Quote:
Originally posted by FerretDruid
Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 5.00)%

Not sure if this is the problem line but maybe this would be better...

Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) x 1.05)


Um.... there is no "Triggering Unit" in that trigger, you can't use "Triggering unit" in a trigger that wasn't triggered by a unit.

His problem is not the "Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 5.00)%" because when you "pick all units" you must use "picked unit" to refer to the units.
01-03-2004, 11:01 PM#5
Eriond
I actually had the devour idea before, but unfortunately, the damage is hard coded. And yes, I tried switching it to a value of the life, but it didn't work. So yes, I'll try yours Allpainful...

Ummm... where's the crago hold slot thing? Can you copy as text, or get as close as possible?

Ok never mind, I read your post and realized that you're right, its' not actually in the map, so I just changed it to this:

Code:
Heal People In Tents
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is being transported) Equal to True
                            Then - Actions
                                Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 5.00)%
                            Else - Actions
                                Do nothing
And it works. Thanks for your help, guys.