• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How Would A Unit Spawn At Same Point After Killing It?

Status
Not open for further replies.
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Events
    • Unit - A unit dies
  • Conditions
    • ...
  • Actions
    • Set temppoint = Position of (triggering unit)
    • Unit - Create one (unit-type of (triggering unit)) at temppoint facing default building degrees
    • Unit - Change Owner of (last created unit) [i don't know if triggering unit works here] to Player x
  • Custom script: call RemoveLocation(udg_temppoint)
 
Level 11
Joined
May 10, 2008
Messages
1,001
Ye after u unit dies.. i want him to revive immediatley for the player which killed him.. where the exact location u killed him at too.... btw i dont think that works squiggy=(
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Temp_Loc = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Killing unit)) at Temp_Loc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Loc)
 
Level 11
Joined
May 10, 2008
Messages
1,001
Hey Thx guys... Btw... would this work?
  • level 300
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Deadly Conversion
    • Actions
      • Trigger - Run Level 300 work <gen> (checking conditions)
  • Level 300 work
    • Events
    • Conditions
    • Actions
      • Set Temp_Loc = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Killing unit)) at Temp_Loc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Loc)
 
Level 3
Joined
May 3, 2008
Messages
44
He doesn't need an event for the second trigger since he's using the first trigger to call it, but still it wont work because you put a triggering unit reference in the second trigger, that has to link back to the event of the second trigger.
 
Last edited:
Level 14
Joined
Nov 4, 2006
Messages
1,241
i don't think it works because you have no triggering unit in the second trigger, you will have to store the triggering unit from the first trigger in a variable, but why don't you just put the actions from the second trigger in the first one?
 
Level 3
Joined
Jun 1, 2005
Messages
42
can't you just do this?

  • random trigger
  • Events
    • Unit - A unit dies
  • Actions
    • Unit - Create 1 (unit -type of (dying unit)) for (owner of (killing unit)) at (position of (dying unit)) facing Default building facing degrees
if you want it so that it has to run through a skill, then

  • 1st Trigger
  • Events
    • Unit - A unit dies
  • Actions
    • Trigger - Run (2nd trigger) (check conditions)
  • 2nd trigger
  • Conditions
    • (Learned Hero Skill) Equal to Deadly Conversion
  • Actions
    • Unit - Create 1 (unit -type of (dying unit)) for (owner of (killing unit)) at (position of (dying unit)) facing Default building facing degrees
not sure about the 2nd part, but hopefully it works.
 
Level 4
Joined
May 3, 2008
Messages
51
Thats Right

This will work fine.

  • Events
  • Unit - A unit dies
  • Conditions
  • ((Dying unit) is a hero) Equal To True
  • Actions
  • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Hide revival graphics
  • Unit - Change ownership of (Reviving Hero) to (Owner of (Killing unit)) and Change color
or if it's a unit.

  • Events
  • Unit - A unit dies
  • Conditions
  • Actions
  • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at (Position of (Dying unit)) facing (Facing of (Dying unit)) degrees
________________________________________________________
________________________________________________________

Hey Thx guys... Btw... would this work?
  • level 300
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Deadly Conversion
    • Actions
      • Trigger - Run Level 300 work <gen> (checking conditions)
  • Level 300 work
    • Events
    • Conditions
    • Actions
      • Set Temp_Loc = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Killing unit)) at Temp_Loc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Loc)

What has learning a skill to do with killing a unit?
 
Last edited:
Level 3
Joined
Jun 1, 2005
Messages
42
i think he wants it so that only those unit killed by the Hero with Dark Conversion ability is sent to the hero side, i.e. a sort of passive skill that enables that change in alleigence.
 
Level 3
Joined
Jun 1, 2005
Messages
42
Basically you want a trigger that goes something along the lines of this:

The Killed unit will only be converted to attacking unit side, if the attacking unit has the passive ability 'Dark Conversion' .
 
Level 9
Joined
Feb 19, 2006
Messages
115
I think this is what you're looking for

  • yourTrigger
  • Events
    • Unit - A unit dies
  • Conditions
    • And (All conditions are true)
      • Integer Comparison (?) level of ( Dark Conversion ) for Killing Unit greater then 0
      • Boolean Comparison - Killing unit is a Hero equal to false // unless you want to get free heros for each hero kill, or you're the only hero on the map
  • Events
    • Unit - Create ( 1 Unit type of (Dying unit) for Owner of (Killing unit) facing default building facing degrees
And as a side note, Triggering Unit (and most other event responses, if not all) will carry over to another trigger, but might not work if you use a wait/timer before using it. Event responses are just global variables that change every time something happens (for example, 'dying unit' will always be the last unit to have died on the map, regardless of what trigger is trying to use it (which is why waits are bad with event responses)).
 
Level 11
Joined
May 10, 2008
Messages
1,001
So would this work???
  • Level 300 Test
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Level of Deadly Conversion for (Killing unit)) Greater than or equal to 0) and ((Unit-type of (Dying unit)) Not equal to Emissary)
    • Actions
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Killing unit)) at (Position of (Dying unit)) facing Default building facing degrees
 
Level 22
Joined
Jun 23, 2007
Messages
3,242
lol...i just realized a way to do this without triggers.
just make it so he drops a rune of reincarntion or something like that. it resurrects the unit and is placed under the players control. however, this isnt automatic, and another player that didnt do anything could get it before the player who killed it could do anything
 
Status
Not open for further replies.
Top