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

Arathi Basin style map (help!)

Status
Not open for further replies.
Level 8
Joined
Feb 14, 2008
Messages
364
So you have to cap points, and the more points your teams possess, the more points you get, the 1st team to reach xx wins.

So i'm having some problems doing this, but let me explain how i (tried) to do this.
I made an integer variable for each team. When a unit enters a region, roughly what i want to happen, is that after xx seconds the point will belong to this team, and the team will recieve x points per x seconds. But my my problem is this, when I set this variable it goes like: XXXXXvariable = 0. So how do i change this "= 0"? Because I made another trigger that when i wrote -gs the variable value would be shown as a message ingame. No matter how much I walk in and out of the region the variable always equals 0. Does anyone know how to fix this?
Right now im like FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU-
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Use "Modify variable" for this. Or you could use Set variable XXXX = Arithmetic ( XXXX + 1 )

And mainly, don't use text command for this. It looks extremely bad in a game. Use a dialog, or directive messages (every 5 seconds, display a message with point in "directive" area - upper middle of the screen). It will look much better.
 
Yeah.
Use modify variable and use (Abs(Variable)) to check for win conditions.
So;

---------------------------------------

Blacksmith - Region
PlayersIn1 - Variable

---------------------------------------

Event -
Unit enters (Blacksmith)
Condition -
Owner of (triggering unit) = Allies of (Player 1)
Event -
Set (PlayersIn1) = ((PlayersIn1) + 1)

---------------------------------------

Event -
Unit leaves (Blacksmith)
Condition -
Owner of (triggering unit) = Allies of (Player 1)
Event -
Set (PlayersIn1) = ((PlayersIn1) - 1)

---------------------------------------

Event -
Unit enters (Blacksmith)
Condition -
or
(Abs(PlayersIn1) = 1
(Abs(PlayersIn1) = 2
(Abs(PlayersIn1) = 3
(Abs(PlayersIn1) = 4
(Abs(PlayersIn1) = 5
Action -
*wait 15 seconds*
Give (blacksmith) to (owner of (triggering unit)) and change color,
Give (blacksmith) to Player 13 (Neutral) and do not change color,

---------------------------------------

Event -
Every 1 second of (real time)
Condition -
Event - (If, Then, Else)
If; (Abs(PlayersIn1) = 0
Then; Turn off (trigger above)
Else; Turn on (trigger above)

---------------------------------------

Edit: Now that I look back you could probably squish 1 or 2
of those into a single trigger using (If, Then, Else), but I was too tired to notice.
 
Fixed the problem, I simply forgot to add an "or" condition.
Fixed some other random stuff that created some problems with the coding in general.
Added a new condition for giving a team CP; to add +1 to their integer it must be 9 or lower, down to 0.
As far as I can see this is as close to Arathi as you're gonna get in SC2.
Yes, it takes a lot of coding for a single base, but there are only 5, and for a good game, that's pretty low if you think about it.
The only downside this version would have compared to the real Arathi is that having more people on a single base only helps outnumber the enemy's count, it does not actually make you capture the point any faster, unlike WoW.

Anyways, hope this helps.
Note: This game took like roughly an hour to brainstorm and create.
Also Note: This game is not designed for publication. It is intended to assist you in learning basic GUI coding and to use logic when doing so.
I will not be pleased if I see this on the B.net list, credit given or not.
 

Attachments

  • ArathiTest.SC2Map
    131.7 KB · Views: 57
Status
Not open for further replies.
Top