• 🏆 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!

[Spell] Creep respawn system

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
I've read the tutorial about this but unfortunately, my system doesnt work. I dont know why, really.
I'm just changing 1 thing is the custom value (since I'm using Unit Indexer)
  • Creep Location Memorize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempGroup = (Units owned by Player 12 (Brown) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A Hero) Equal to False)))
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set CV = (Custom value of (Picked unit))
          • Set CreepRespawnPoint[CV] = (Position of (Picked unit))
      • Custom script: call DestroyGroup(udg_tempGroup)
  • Creep Point
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set CreepRespawnPoint[CV] = (Position of (Triggering unit))
  • Creep Respawn
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to False
      • (Unit-type of (Dying unit)) Not equal to Sapphiron (undead)
      • (Unit-type of (Dying unit)) Not equal to Lich King (Evil)
      • (Unit-type of (Dying unit)) Not equal to Ghost
      • (Unit-type of (Dying unit)) Not equal to Horn of Cenarius Pedestal
      • (Unit-type of (Dying unit)) Not equal to Maiev
      • (Unit-type of (Dying unit)) Not equal to Maiev
    • Actions
      • Wait 45.00 seconds
      • Set CV = (Custom value of (Dying unit))
      • Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at CreepRespawnPoint[CV] facing (Random angle) degrees
      • Custom script: call DestroyGroup(udg_tempGroup)
      • Custom script: call RemoveLocation(udg_CreepRespawnPoint[udg_CV])
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
if u switch it over to triggering unit like maker said it will work.
waits are a bad idea tho as they are inaccurate ( can be countered) and they continue to countdown when the player disconnect dialog box comes up. ( cant be helped)
this can cause unwanted effects and unfair gameplay. look at my tutorial on more about using waits.
 
Status
Not open for further replies.
Top