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

The respawn trigger isn't working.

Status
Not open for further replies.
Level 3
Joined
Dec 27, 2012
Messages
36
The problem, it's a respawn trigger and for some reason it doesn't work.
I tryed many tutorials and did how they did it but still it's not working...i even tryed the tutorial hero on the Hive, but still no proggres...could someone help me please.:sad:
 

Attachments

  • Rise of the Heros.w3x
    262 KB · Views: 47
Level 28
Joined
Jan 26, 2007
Messages
4,789
You forgot to put the actions in the loop.

This (correct):
  • Creep Position
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Entire map) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Integer = (Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Integer
          • Set Point_CR[Integer] = (Position of (Picked unit))
Instead of this (wrong):
  • Creep Position
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
      • Set Integer = (Integer + 1)
      • Unit - Set the custom value of (Picked unit) to Integer
      • Set Point_CR[Integer] = (Position of (Picked unit))
(To anyone wondering: this map does not use Unit Indexer).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I'm sorry I wasn't being clear on that, you do not need Unit Indexer :D. I mentioned it because I was pretty sure someone would come here and say "that won't work if you use Unit Indexer".
Or to be more precise, you don't 'have' to use it. You can do it though, but then you need to change the triggers a little bit.

First Trigger:
  • Creep Position
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Entire map) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Point_CR[(Custom value of (Picked unit))] = (Position of (Picked unit))
Second Trigger:
  • Creep Respawn
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • ((Triggering unit) is Summoned) Equal to False
    • Actions
      • Wait 3.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Point_CR[(Custom value of (Triggering unit))] facing Default building facing degrees
      • Custom script: call RemoveLocation( udg_Point_CR[GetUnitUserData( GetTriggerUnit() )] )
      • Set Point_CR[(Custom value of (Last created unit))] = (Position of (Last created unit))
If you do not use Unit Indexer, then you can change the first trigger according to my previous post and leave the second trigger alone (don't change it).
 
Level 3
Joined
Dec 27, 2012
Messages
36
Ok the thing is I still have the unit indexer and I didn't change the second trigger and the first one is as you post it...and for some unknown reaseon it works. I'll leave that way because i don't want to broke it, if any bugs show up ill do as you sayd. Thanks for the help too! :D
 
Status
Not open for further replies.
Top