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

[Solved] Creep & Dungeon Respawn Bug

Status
Not open for further replies.
Level 2
Joined
Dec 2, 2014
Messages
15
This trigger sets the custom value for units so that I can use it for the exact place to respawn them in the exact place
Respawn Initialization.PNG

This trigger is for both normal respawn outside of dungeons and inside dungeons by checking the dying unit's custom value and adding it to the unit group for dungeon respawn when you leave the dungeon.
Respawn pic1.PNG

Respawn pic2.PNG

This trigger is what triggers the respawn on units by getting out of the dungeon
Dungeon Trigger.PNG

I got the creep respawn from this page How to: Create a Creep Revival System
The units spawn in the wrong place for some reason
 
Level 11
Joined
Jul 25, 2014
Messages
490
Well, you are offsetting the coordinates based on the center of the entire map, you're not actually creating units at your saved coordinates.
What you should do is either create a TempPoint based on these coords or use a custom script that allows to create units directly with coordinates. I'm not sure why you're not using points instead of coords here in the first place :D
 
Level 2
Joined
Dec 2, 2014
Messages
15
Define "wrong".
they spawn far higher then they are supposed to go

Well, you are offsetting the coordinates based on the center of the entire map, you're not actually creating units at your saved coordinates.
What you should do is either create a TempPoint based on these coords or use a custom script that allows to create units directly with coordinates. I'm not sure why you're not using points instead of coords here in the first place :D
first of all, not gonna lie but the reason I created it with coords is because the helper told me to and I don't really know what I'm really doing with this:(
and second of all can you direct me on the custom code of setting all the points?
 
Last edited by a moderator:
Level 2
Joined
Dec 2, 2014
Messages
15
Use a point (location) array and at map initialization set it to the position of the creep. Every time you respawn the creep use that location. No leak and faster than x/y.
would the exact code look like this?
set udg_UnitRespawnPoint[udg_RespawnInt] = GetUnitLoc(GetEnumUnit())

Use a point (location) array and at map initialization set it to the position of the creep. Every time you respawn the creep use that location. No leak and faster than x/y.
btw you completely solved my problem you're the best dude +rep to you :)
 
Last edited by a moderator:
Status
Not open for further replies.
Top