• 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.

[Trigger] Creep revival trigger!! :/

Status
Not open for further replies.
Level 8
Joined
Mar 23, 2013
Messages
66
I'm trying to make a trigger for respawn creep without randoms groups.. but i don't know how to do to put the Custom Loc for the respawn of each unit without make a region.. I've tried this way.. And didn't work.. Can you help me with it?

This is in Map initialization,


This is the Currently trigger,


It Have also 3 Variables: Integer - integer number - 0
CreepX - Real Array1 - 0
CreepY - Real Array1 - 0

I hope Read Soon Any Helpful Answer!! :p
 
Level 3
Joined
Feb 25, 2009
Messages
38
first off, copy triggers as text.

second, something like this?

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set FootyLoc = (Position of (Triggering unit))
      • Unit - Create 1 Footman for (Owner of (Triggering unit)) at FootyLoc facing Default building facing degrees
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
"Dying Unit" doesn't always work after a wait I believe. It is recommended to use "Triggering Unit".

This should work (without locations :D):
  • Revive Creeps
    • Events
      • Unit - A unit owned by Player 11 (Dark Green) Dies
      • Unit - A unit owned by Player 12 (Brown) Dies
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • -------- Revives a creep after 5 seconds (at his initial position) --------
      • Custom script: local integer id = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer i = GetUnitUserData(GetTriggerUnit())
      • Custom script: local real x = udg_CreepX[i]
      • Custom script: local real y = udg_CreepY[i]
      • Wait 5.00 seconds
      • Custom script: call SetUnitUserData(CreateUnit(GetTriggerPlayer(), id, x, y, 0.), i)
 
Level 8
Joined
Mar 23, 2013
Messages
66
"Dying Unit" doesn't always work after a wait I believe. It is recommended to use "Triggering Unit".

This should work (without locations :D):
  • Revive Creeps
    • Events
      • Unit - A unit owned by Player 11 (Dark Green) Dies
      • Unit - A unit owned by Player 12 (Brown) Dies
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • -------- Revives a creep after 5 seconds (at his initial position) --------
      • Custom script: local integer id = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer i = GetUnitUserData(GetTriggerUnit())
      • Custom script: local real x = udg_CreepX[i]
      • Custom script: local real y = udg_CreepY[i]
      • Wait 5.00 seconds
      • Custom script: call SetUnitUserData(CreateUnit(GetTriggerPlayer(), id, x, y, 0.), i)

IT could work.

Have you tried :native Location takes real x, real y returns location

I'm not that good at JASS, this is my first map D:.. Don't be hard with me xD
 
Last edited by a moderator:
Level 28
Joined
Jan 26, 2007
Messages
4,789
It doesn't work.... :/ The units don't revive in the origin location.. you kill one.. and then that one is in the city making caos.. :|
And I guess the city is at the center of the map?

Anyways, it should work with the triggers you've shown (that group-loop that sets the custom values for units should still be there).
 

Attachments

  • Revive Creeps.w3x
    14.4 KB · Views: 60
Level 8
Joined
Mar 23, 2013
Messages
66
And I guess the city is at the center of the map?

Anyways, it should work with the triggers you've shown (that group-loop that sets the custom values for units should still be there).

NOp.. The city is near the creeps is 600/900 range.. i tried it with some modifications.. but i don't know why it doesn't work i keep looking a solution,, If i can't i think i'll try to use location..

I fixed it.. Your way is great.. Was my mistake.. Thanks you! :) You're Great!
 
Last edited by a moderator:
Status
Not open for further replies.
Top