HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Lasers Don't "Kill"

06-20-2007, 08:34 AM#1
Tide-Arc Ephemera
Ok, I have made several dummy units called "Lasers" which deal damage upon death based on the Goblin Land Mine's effect.

It is blue versus red...

I have created a series of triggers (Well... 2), which the first adds units to be prone to lasers, and the second relevant one makes them die.

Trigger:
LM Explosion
Events
Collapse Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to LASER Blue Ray
(Unit-type of (Triggering unit)) Equal to LASER Light Beam
(Unit-type of (Triggering unit)) Equal to LASER Spray Beam
Collapse Actions
Unit - Kill (Triggering unit)

That is what kills the laser so that it releases it's deadliness...

Now, I'm making a revive trigger...

Trigger:
GT Revive Blue
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A Hero) Equal to True
(Color of (Owner of (Dying unit))) Equal to Blue
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Color of (Owner of (Killing unit))) Equal to Red
Collapse Then - Actions
Game - Display to (All players) for 6.00 seconds the text: (((|cffff0000 + (Name of (Owner of (Killing unit)))) + |r has zapped |cff0000ff) + (((Name of (Owner of (Dying unit))) + |r) + !))
Game - Display to (All players) for 6.00 seconds the text: (((|cffff0000 + (Name of (Owner of (Dying unit)))) + |r) + will be revived in 10 seconds.)
Set ReaRevive[(Player number of (Owner of (Dying unit)))] = 9.00
Collapse Else - Actions
Game - Display to (All players) the text: ((|cff0000ff + (Name of (Owner of (Killing unit)))) + ((|r has team-killed |cff0000ff + (Name of (Owner of (Dying unit)))) + |r!))
Game - Display to (All players) for 6.00 seconds the text: (((|cffff0000 + (Name of (Owner of (Dying unit)))) + |r) + will be revived in 30 seconds.)
Set ReaRevive[(Player number of (Owner of (Dying unit)))] = 29.00
Wait 1.00 seconds
Set PntRevive = (Center of Blue Revive <gen>)
Unit - Move (Dying unit) instantly to PntRevive
Custom script: call RemoveLocation(udg_PntRevive)
Wait ReaRevive[(Player number of (Owner of (Dying unit)))] seconds
Set PntRevive = (Center of Blue Team <gen>)
Hero - Instantly revive (Dying unit) at PntRevive, Hide revival graphics
Custom script: call RemoveLocation(udg_PntRevive)
Set PntRevive = (Center of Blue Team <gen>)
Camera - Pan camera for (Owner of (Dying unit)) to PntRevive over 0.50 seconds
Custom script: call RemoveLocation(udg_PntRevive)

The bug here involves...
  • It doesn't display killer's name on message and is always a team kill*
  • The units killed in this method are not giving bounty
  • ^The bounty is in fact on
  • Since the kills aren't "kills", they aren't giving experience and as ^2 said, no gold either

___

*Zoom (requires log in)
___

Now here's my question...

Do I have to change the ability or do I have to change the trigger?
___

Unlike the last question I remember asking (I think about SPFX with Z coordinate), please no triggers 100% in JASS and no smart-alike answers which incorporate crap load (51%≥) of custom script.
Attached Images
File type: jpgBlah.jpg (31.6 KB)
06-20-2007, 08:53 AM#2
Pyrogasm
Could you perhaps explain the first trigger a bit more? I don't fully understand what you're trying to make it do.

Additionally, "Dying Unit" does not work after waits, nor does "Killing Unit". For your trigger, I would suggest using "Triggering Unit" instead of "Dying Unit", and then creating a pseudo-local using a GUI trick to store the Killing unit to a variable.

To do that, you'll need to create a variable called whatever you want and then add this line as the first line of the trigger:
Trigger:
Custom script: local unit udg_Your_Variable_Name = GetKillingUnit()
Just make sure to change "udg_Your_Variable_Name" to "udg_"+TheNameOfTheVariable.
06-20-2007, 08:56 AM#3
Tide-Arc Ephemera
First trigger just adds an event.

Trigger:
Unit - (Last created unit) comes within range of unit.

That's basically all it does.

The dying unit revives it just fine, I'll try out your local variable thingo...

Edit* - Um... I added your line of custom script to the very first line of my "Revival" trigger (GT Revive Blue) and it didn't change anything... Did I implement it incorrectly?
06-21-2007, 05:39 AM#4
Tide-Arc Ephemera
*bump...

Anyway, it didn't work, I added that pseudo-variable to the first line of the revival trigger, it didn't change anything