• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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: 46
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