• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Issue With Creature Respawn Question

Status
Not open for further replies.
Level 7
Joined
Nov 6, 2019
Messages
186
Basically i use a script to Respawn Creeps in there original spot, i use it on old map and it works perfectly, but for some reason on this map, when u chose a hero u cant move the hero anymore, but disabling the trigger to respawn creeps and u can move hero

  • SetUpCR
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set VariableSet Respawn_Time = 30.00
      • Unit Group - Pick every unit in (Units owned by Neutral Hostile.) and do (Actions)
        • Loop - Actions
          • Set VariableSet Temp_Interger = (Temp_Interger + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Interger
          • Set VariableSet Creep_Point[Temp_Interger] = (Position of (Picked unit))

  • RespawnCRCS
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
      • Wait Respawn_Time seconds
      • Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
  • ReAddCR
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Set VariableSet Temp_Interger = (Temp_Interger + 1)
      • Unit - Set the custom value of (Triggering unit) to Temp_Interger
      • Set VariableSet Creep_Point[Temp_Interger] = (Position of (Triggering unit))

EDIT: well there no longer freezing player, but they now only respawn half the time, anyone know a fix
 
Last edited:
Level 7
Joined
Nov 6, 2019
Messages
186
Player 12 is no longer neutral hostile with the addition of 24p maps. So after respawning them once they won't be owned by NH so the next time they die they won't respawn because the condition will be false.

Ah Makes sense, 24 it is.

also quick question so I don’t have to open new thread and wait a week for it to be approved

is it possible to set a units name to show in game, like ones owned by hostile, but owned by a player? Instead of it showing player on its head

Basically I don’t want these units apart of the respawn trigger, want them on different respawn timer as there be boss units
 
Last edited:
Status
Not open for further replies.
Top