HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

damage taken ?

04-29-2005, 01:47 PM#1
escpy
event - advanced - any units take damage
condition -
action - game - display to (all players) the text: (Damage taken = + (string((damage taken))))

what i see in the game ...

Damage taken = 0.000

how do i solve it ?
04-29-2005, 03:11 PM#2
Sven8136
because you are displaying an empty string? damage taken is a real i believe, you need to put in something like

string damage taken = Real to String (Damage taken of (triggering unit))
04-29-2005, 03:19 PM#3
Vexorian
Quote:
Originally Posted by escpy
event - advanced - any units take damage
condition -
action - game - display to (all players) the text: (Damage taken = + (string((damage taken))))

what i see in the game ...

Damage taken = 0.000

how do i solve it ?
Most likelly it is a bug with WEU
04-29-2005, 04:38 PM#4
escpy
if i set event to
specific unit take damage
it work fine ..


/edit .. if this is a bug with weu .. hope it can be fix soon
04-29-2005, 05:00 PM#5
Vexorian
Are you initializing advanced triggers?
04-29-2005, 05:07 PM#6
escpy
yes .. of coz
04-29-2005, 06:20 PM#7
Raptor--
did you read the note on (damage taken)? its in response to the event (specific) 'unit - takes damage'

maybe you should stick to not WEU
04-29-2005, 11:52 PM#8
escpy
if used specific unit (must select an unit) .. then i cant assigned it to my creeps that spawned randomly .. i wanted to use this feature on them ..
04-30-2005, 03:42 AM#9
Raptor--
dynamically add new events if you want
04-30-2005, 05:15 PM#10
Sven8136
this works, but its really shakey in stability

Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
Actions
Set initial_life = (Life of (Attacked unit))
Wait 1.00 seconds
Set post_life = (Life of (Attacked unit))
Set damage_taken = (String((Integer((initial_life - post_life)))))
Game - Display to (All players) for 10.00 seconds the text: damage_taken
Set initial_life = 0.00
Set post_life = 0.00
04-30-2005, 05:29 PM#11
Raptor--
Quote:
Originally Posted by Sven8136
this works, but its really shakey in stability

Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
Actions
Set initial_life = (Life of (Attacked unit))
Wait 1.00 seconds
Set post_life = (Life of (Attacked unit))
Set damage_taken = (String((Integer((initial_life - post_life)))))
Game - Display to (All players) for 10.00 seconds the text: damage_taken
Set initial_life = 0.00
Set post_life = 0.00

indeed, since attacked is not the same as take damage, for one a unit is attacked before a projectile lands, two, a unit can be attacked the player can press stop, and it will count as an attack but the unit will not have struck and will attack again

like i said, you can add the event (specific unit - takes damage) dynamically to the trigger
04-30-2005, 08:27 PM#12
Sven8136
thats why theres that wait command, for the attack to hit. like I said, its not really stable, but works. I dont use WEU or anything, just regular WE.
04-30-2005, 11:34 PM#13
Vexorian
A unit enters playable map are
---

Trigger . To Detect Damage <gen> add the event (triggering unit) takes damage
05-01-2005, 12:30 AM#14
escpy
Quote:
Originally Posted by Lord Vexorian
A unit enters playable map are
---

Trigger . To Detect Damage <gen> add the event (triggering unit) takes damage
can explain more detail ?
05-01-2005, 06:00 AM#15
Raptor--
Quote:
Originally Posted by escpy
can explain more detail ?

whenever you create a unit, run the action
trigger - add event
as
trigger - add (last created unit takes damage) to TakeDamageTrigger

it adds new events to the trigger for all the new units you make, you were complaining about it only being for specific units