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

[Crash] MUI Region Creep Movement System

Status
Not open for further replies.
Level 10
Joined
May 16, 2013
Messages
229
Hi,i making a new map.My terrain is done.This map like a survival chaos but with 6 players.My problem at unit movements.
My Terrain is that:

UE0NySa.png


Units moves normal at start,but if some players base destroyed this changes...
Like all players are destroyed,only teal (Right Bot) and red left. (Left Top)
I made a trigger like that.I need a MUI region movement system please help :/
My english are bad and i know i cant tell my problem great.

IfRuEVk.png


If anyone played survival chaos he can understand bug.
I need movement system like survival chaos but with 6 players.
 
Level 10
Joined
May 16, 2013
Messages
229
yes sure i will try to explain,example reds top barrack units go to right,and blue top barrack units go to left,red wins blue destroyed,red need go to down to fight with another player.If i made that trigger with player owned condition this will work for red,but not works for another players unit,like red units go down yes works,but orange attacking to top too well in my triggers cant attack,go to down like red and stucks. I hope you understand :)

I think i need save location trigger or another i dont know but i think i need different triggers.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Use a case statement with a movement order for each player? Also you are leaking locations, which for something run as often as a movement trigger is bad and needs immediate fixing.

Case statements in JASS are basically if, elseif (many times), else, endif. In GUI the same result can be achieved by nesting conditional if blocks inside the else part of the previous test.
 
Been a Survival Chaos player for about a year.
I understand the issue. When a player base's destroyed, the unit will remain in the base and don't continue to any other bases. Correct me if I mistaken.
I suggest Trigger the units to run following the 360 degree technique, it doesn't seems to be complex except it can't be applied well for troops from middle zone
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
How I would do it.

Setup the following.
Player Variable (Array) - Containing all players
Region Variable (Array) - All the creep destinations
Boolean Variable (Array)

Make sure the array index of the each player variable corresponds with the associated region variable. (eg. Player 1 would be PlayerVariable(1), player 1's creep destination would be RegionVariable(1))

Spawn units for every player, actual spawn triggers go within loop. (Although Im sure you already knew that :p)
  • For each (Integer Variable) from 1 to Player Count, do (Actions)
    • Loop - Actions
Now all you need to do is check if the Boolean Variable is true, if true you spawn units, if false you don't. When a player is defeated, you set the Boolean Variable of the associated player to false.

  • Set PlayerStillalive[(Player number of (Defeated Player)] = False
 
Level 10
Joined
May 16, 2013
Messages
229
Been a Survival Chaos player for about a year.
I understand the issue. When a player base's destroyed, the unit will remain in the base and don't continue to any other bases. Correct me if I mistaken.
I suggest Trigger the units to run following the 360 degree technique, it doesn't seems to be complex except it can't be applied well for troops from middle zone

Yes my problem is that
 
Level 10
Joined
May 16, 2013
Messages
229
How I would do it.

Setup the following.
Player Variable (Array) - Containing all players
Region Variable (Array) - All the creep destinations
Boolean Variable (Array)

Make sure the array index of the each player variable corresponds with the associated region variable. (eg. Player 1 would be PlayerVariable(1), player 1's creep destination would be RegionVariable(1))

Spawn units for every player, actual spawn triggers go within loop. (Although Im sure you already knew that :p)
  • For each (Integer Variable) from 1 to Player Count, do (Actions)
    • Loop - Actions
Now all you need to do is check if the Boolean Variable is true, if true you spawn units, if false you don't. When a player is defeated, you set the Boolean Variable of the associated player to false.

  • Set PlayerStillalive[(Player number of (Defeated Player)] = False

I will do that thanks but i think my problem is not that.But i will try.

Edit: Well i have one question every player have got 3 destinitions,i will gave 3 array to every player?
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
And for mid you use the same thing, if the player on the opposite side have been defeated you make the units in mid change destination.
 
Level 23
Joined
Oct 12, 2008
Messages
1,783
Btw i need help guys :( thanks kino but you didnt solved my problem i think my problem is different. I need a 360 degree region movement system. But i don't know how to create.

Nope, I get your problem.
What I posted is exactly how I would create a 360 degree movement system that scales based on players alive.
If it isn't working, its because you did it wrongly.
 
Level 10
Joined
May 16, 2013
Messages
229
Okay, but i don't understand this points,player 1's creep destination would be RegionVariable(1)) hmm this regions will be only his base? Because unit spawns from 3 regions for every player.Pff i dont understand shit.Can you give to me a small example? Please and thank you for your comments and replies.
 
Last edited:
Level 23
Joined
Oct 12, 2008
Messages
1,783
Okay, but i don't understand this points,player 1's creep destination would be RegionVariable(1)) hmm this regions will be only his base? Because unit spawns from 3 regions for every player.Pff i dont understand shit.Can you give to me a small example? Please and thank you for your comments and replies.

Which part do you not understand?

If they spawn from three regions then you will need 4 region arrays instead of 2.
eg. for player 1.
Playerbase(1)
Playerspawn1(1)
Playerspawn2(1)
Playerspawn3(1)

The first region is the base location, the other three being the spawn points.
 
Status
Not open for further replies.
Top