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

Having trouble with 'Region - Move'

Status
Not open for further replies.
Level 3
Joined
Apr 29, 2009
Messages
42
This is a really strange problem (atleast for me), here I have a region that has two purposes..
1. Heroes will respawn at this region when they die
2. Heroes will bring "The Flag" to this region to get points (this is a CTF map i'm working on)

So I created a region at the map, which will be used for this stated above, but I want the players to have some options where to set their respawn points so I created some triggers which works fine for this. And one of these triggers works like this: when a player sets his respawn point the trigger moves the 'respawn region' for that player to a certain location, this also works, the heroes respawn at this new location so I'm guessing that the moving of the region went fine. BUT when a hero comes with "The Flag" to get some points for retrieving it, it doesnt work. By accident then I was running by the old position of the region and then my message popped up saying i retrieved the flag and got some points. So what i'm saying is that the region is moved but still it isn't... or something like that.

Any help or suggestion is greatly appreciated :sad:

Picture and triggers:



 
Level 8
Joined
Jun 26, 2010
Messages
530
  • Actions
    • Set REGION_TempRespawnPoint[1] = Spawn Point 01 <gen>
    • Region - Center REGION_TempRespawnPoint[1] on (Center of Spawn Point 01 <gen>)

Did you noticed you are centering a region on it's own center?

  • Actions
    • Unit - instantly revive UNIT_Hero[1] at (Center of Team Spawn Point Red <gen>). Show revival graphics.

If the spawn point moves, you should be using a region variable for another region or you should have a trigger moving Team Spawn Point Red <gen>

You should use Set UNIT_Hero[Owner of(triggering unit)] instead of adding a If-Then-Else for the players. (unless you want it to work only for those players, of course)




The player will be able to chose more than 1 hero? If so, the unit hero variable shouldn't change.


I may edit this post with more stuff when i get home.
 
Level 3
Joined
Apr 29, 2009
Messages
42
Thanks for reply but the respawn of my heroes works fine as it is.

Did you noticed you are centering a region on it's own center?
No i'm not centering a region on it's own center, there are two different variables.

  • See?
  • REGION_RespawnPoint[1]
  • REGION_TeamRespawnPoint[1]
Actually setting that variable "region_respawnpoint[1] = spawn point 01" is not necessary at all, it's just set as a backup incase I would wanna change the respawn to a point instead of a region.

Anyhow, thanks for reply but you didn't help me :/ +rep for taking your time trying
 
Level 3
Joined
Apr 29, 2009
Messages
42
you should probably change the event at the last trigger since the event was set to the loc of the region before the player chooses a loc for it.

Yes probably, but how/what should I replace this with? I've tried with setting this region to a variable and then change the event to A unit enter <variable name> but if I remember correct that wasn't possible with the WE GUI Trigger Editor. Also tried units comes within XXX of <unit_variable>, and that wasn't possible either. Sry if my explanation is poor, i'm at work so I don't have the WE here.
 
Level 7
Joined
Mar 12, 2006
Messages
407
you could do a periodic event which checks each x seconds if the unit is within xxx of <unit variable>
But you should be aware that this might cause lagg. And make sure to not have any leaks in that trigger

Note that this is no nice way to do it but if you cant make up any other way this will work
 
Level 3
Joined
Apr 29, 2009
Messages
42
you could do a periodic event which checks each x seconds if the unit is within xxx of <unit variable>
But you should be aware that this might cause lagg. And make sure to not have any leaks in that trigger

Note that this is no nice way to do it but if you cant make up any other way this will work

Thanks, i'll try that when I come home.
If anyone got any other suggestions i'm still looking for a better solution.
 
Level 8
Joined
Jun 26, 2010
Messages
530
No i'm not centering a region on it's own center, there are two different variables.

Oopsies, you're right, my mistake ;p

Well, let me see if i got your explanation. After someone moves the respawn region that region is also used (wrongly) for returning the flag, right?

  • Actions
    • Region - Center REGION_TempRespawnPoint[1] on (Center of Spawn Point 01 <gen>)
Correct me if i'm wrong but this "back up" action is seting the point where the flag will return (as you set TempRespawnPoint into this variable at map init) at the same point where the heroes will respawn. Try deactivating this function.

Also, i'm pretty sure at least my hidden tag directing you to "how to quickly post triggers" helped you. Screenshots are just bad :p
 
Status
Not open for further replies.
Top