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

U smart? Please help me with simple system!

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
Hi all,

I need an system for my map, but im not smart enough for it i think:(

some info for it:

-There are 8 Control Points
-Each Control Point contains 2 Spawn Points
-Each Control point is surrounded by 2 other Control points
-Each Spawn point has to spawn units that go to the correct direction like this example:
all%20diferent%20control%20points%20with%20directions.jpg



Now comes the tricky part:

-If a player controlles more Control points that are next eachother, then i want the spawns to pass the Control point owned by same player and "Attack-Move To" the next Control point in the following order. (1 Spawn has to go Left and 1 right)
Example:
some%20different%20control%20point%20players%20with%20directions.jpg


Hope u all understand what system i need.

U smart enough to make this system for me?

Realy deserve +Rep +Rep +Rep +Rep if u can!!!
 
Level 7
Joined
Jun 15, 2010
Messages
218
A system like this wont work:

sample
Events
Time - Every 7.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in Top Left Spawn Point 1 <gen>) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Picked unit)) Equal to Owner_Control_Point_Bot_Left) and ((Owner of (Picked unit)) Equal to Owner_Control_Point_Top_Left)
Then - Actions
Unit - Order (Picked unit) to Attack-Move To (Center of Control Point Top Mid Left <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Picked unit)) Equal to Owner_Control_Point_Top_Mid_Le) and ((Owner of (Picked unit)) Equal to Owner_Control_Point_Top_Left)
Then - Actions
Unit - Order (Picked unit) to Attack-Move To (Center of Control Point Bot Left <gen>)
Else - Actions


Its kinda hard couse this trigger wont give the spawns the right directions.
example:
Control%20Points%20Example%20of%20Failure.jpg


The direction i made in red is for a spawn point that should always walk counterclockwise. But after it goes from Top_Mid_Left to Top_Left, it goes back again :(
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Give each spawn a custom value of 1 to go clockwise and -1 to go anti clockwise.
Map each rect into an array of 8.
As units each each waypoint, the Control point will send then to the next rect based on their custom value.

1 Spawn in each spawns them with custom value of -1 and the other with custom value of 1 and orders them to attack move to that base's control point.

Thats all you need to do.

Just to warn you, your map design seems kind of flawed. The result is that whoever owns the most control points automatically wins. For example, lets say I am surrounded by reasonable people, the result is I am stalemated for ages. The player on the other side however is surrounded by noobs who he conquers. Now he owns 3 bases where everyone else owns 1, he will soon own 4, then 5 then 6 then 7 then 8 and win cause he will be getting 3 times the number of spawns as all the players he is next to. In this case, why not end the game automatically as there is no point in playing when it is unwinable.

Or do you have some cleaver way to prevent bulldozing in this map?
 
Level 7
Joined
Jun 15, 2010
Messages
218
Yea normaly the player with most control points would win, but not in mine game, it just gives some advantage:)

My only problem now is that i dont realy understand that units costum value and map rect :( i do understand arrays
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Custom value stores an integer to a unit, it defaults to 0. From that unit you can read that integer later.

A rect is what GUI calls a region, however a true region is an entirly different type. A rect is a square area of the playfield. A region is comprised of 1 or more rects or map cells (what ever those are).

You can get the center of a rect, you can not get the centre of a region. You can run triggers when a unit enteres a region but not when a unit enteres a rect (GUI makes a region from a rect to do this).
 
Level 7
Joined
Jun 15, 2010
Messages
218
Ahhh i think u found my sollution!!!

Still im wondering how to get a rect in GUI and why i should use it instead of an region
 
Status
Not open for further replies.
Top