HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Fire Damage

04-13-2003, 10:40 PM#1
silvery2k
How do i make it so a unit takes damage when they are in a fire like in the undead mission where units took damage in the barrier?
04-13-2003, 11:00 PM#2
Spectralist
you'll need a unit group variable and regions that cover the area in which you want the units to take damage in.

Trigger 1

this trigger adds units to unit groups

Events-
Unit - A Unit enters RegionName <gen>
//you will have to list all of the regions that the effect will be in here)

Conditions-
//for the map that I have this effect I have some units that are immune to it
(Unit-Type of (Triggering unit)) Not equal to ImmuneUnitType//this isnt necisary if you dont want immune units

Actions-
//I have this change the color of the unit to tint it red a little
Animation - Change (Entering unit)'s vertex coloring to (100%, 75%, 75%) with 0% transparancy
//Add it to a unit group for the second trigger
Unit Group - Add (Entering unit) to UnitGroupofYourChoice

Trigger 2

this trigger does the damage

Events-
Time - Every 1 seconds of game time

Conditions-

Actions-
Unit Group - Pick every unit in UnitGroupofYourChoice and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 3.00))

Trigger 3

this trigger removes units from unit groups

Events-
Unit - A unit leaves RegionName <gen>
//you will have to list all of the regions that the effect will be in here)

Conditions-

Actions-
//I have this change the color back to normal
Animation - Change (Entering unit)'s vertex coloring to (100%, 100%, 100%) with 0% transparancy
//remove it from your unit group
Unit Group - Remove (Entering unit) to UnitGroupofYourChoice
04-14-2003, 11:56 PM#3
silvery2k
thanks
04-18-2003, 02:09 AM#4
silvery2k
I AM CONFUSED AHAHAHHA (caps)
I tried to do this and all was well until trigger 2's actions I did what you saided but their was no -3.00 in the action so what do I do? and BTW for the Unitgroupofyourchoice I could not find it.
04-18-2003, 08:33 AM#5
Spectralist
Quote:
Originally posted by silvery2k
I AM CONFUSED AHAHAHHA (caps)
I tried to do this and all was well until trigger 2's actions I did what you saided but their was no -3.00 in the action so what do I do? and BTW for the Unitgroupofyourchoice I could not find it.


-3.00 is part of the function on the above line it just didnt fit on one line

Unitgroupofyourchoice thats just your choice of name for a unit group, you need to make one you can do this by:Hitting control b while in the trigger editor.

I'll attach a demo of this that I quikly threw together
I changed the colors to 100% 25% 25% to make it look more red as the 100% 75% 75% looked just a little pink.
04-18-2003, 11:33 AM#6
silvery2k
thanks