HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

1 time damage

10-09-2006, 10:07 PM#1
Hemlock
I am trying to create a spell and let it do a certain amount of damage to a unit upon hit.

but apperantly it doesn't since I kill a peasent with only touching it once, while the damage only does about 100 damage.

The trigger that does this looks like this.
Trigger:
Slice
Events
Collapse Conditions
SB_Abilitytrue Equal to True
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Triggering unit) is alive) Equal to True
((Triggering unit) belongs to an enemy of SB_Castowner) Equal to True
((Triggering unit) is A flying unit) Equal to False
((Triggering unit) is A structure) Equal to False
((Triggering unit) is Magic Immune) Equal to False
((Triggering unit) is Magic Immune) Equal to False
Collapse Then - Actions
Game - Display to (All players) the text: works
Set SB_Temppoint = (Position of (Triggering unit))
Special Effect - Create a special effect at SB_Temppoint using Objects\Spawnmodels\Orc\OrcSmallDeathExplode\OrcSmallDeathExplode.mdl
Custom script: call RemoveLocation (udg_SB_Temppoint)
Set SB_SFXcan[SB_SFXnumber] = (Last created special effect)
Set SB_SFXnumber = (SB_SFXnumber + 1)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - SB_Damage[SB_Level])
Else - Actions

the event is

Trigger:
Trigger - Add to Slice <gen> the event (Unit - A unit comes within 75.00 of SB_CastUnit)

Perhaps that the event is it, cause I put it in a trigger that triggers itself more times that one as well, but if I put that event in the melee inits, than it doesn't seem to work


suggestions are welcome
10-09-2006, 10:26 PM#2
Freakazoid
Don't use set life.

Use Unit - Deal Damage action!
10-09-2006, 10:43 PM#3
aquilla
Make it work for one unit first; no multi-unit instancability. Then improve it MUI, though it would probably be difficult in GUI..
10-09-2006, 10:58 PM#4
Mystic Prophet
I'm not seeing where you're setting SB damage. since the damage is the thing you're having trouble with, It might be a good idea to post that trigger.