• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

giving points for regions owned?

Status
Not open for further replies.
Level 3
Joined
Jul 5, 2004
Messages
38
can someone help me with my problem?

problem: how can you let the map check every XX seconds that a region (13 in total) has a building on it (flag) and thus "owned" by one of 2 forces.
( this part isnt the really hard i can do this myself but then we come to part2 )

adding all those regions to 2 numbers: how much regions owned by force1, and foce2. and those 2 numbers added into a multiboard. ( i heard i need real or strings for it? )

example multiboard:

XXXXXXXXXXXXXXXXXXXXXXXXX
X---forces:-------regions owned:
X------------------
X---force1---------7
X---force2---------6
X------------------
XXXXXXXXXXXXXXXXXXXXXXXXX
 
Level 3
Joined
Jul 5, 2004
Messages
38
sry for kick but i really want this answered :cry:
if everyone doesnt understand the question i could rephrase it or give my map as example.
 
Level 3
Joined
Oct 21, 2004
Messages
72
I'm not entirely sharp with the editor.

Use variables is my best suggestion.

I don't remember the exact trigger, but you can change variables fairly easily.

Like if Force 1 captures a region you can do +1 to variable X, then display variable X on the multiboard.

Make sure to create variable X with 0 value in the beginning.

If need be I can open the editor to find the exact triggers and the like, but I'm just doing this from memory.

Need Info: Can you check every XX seconds if region is owned by Force X, or is that also something you needed help on?
 
Level 3
Joined
Oct 21, 2004
Messages
72
Then just do a trigger then has (in simple form):

Event:
Ownership of region is switched to team X

Conditions:
Triggering region wasn't previously owned

Actions:
Add +1 to TeamControlReg [This is the variable]

Then do another trigger..

Event:
Variable TeamControlReg is changed

Actions:
Update multiboard

Again, if you need the exact code I can open the editor, this is all from memory pretty much.
 
Level 3
Joined
Jul 5, 2004
Messages
38
just curious, how do you do the "Event:
Ownership of region is switched to team X " ?

cant find it anywhere under events :roll:
 
Level 9
Joined
Sep 8, 2004
Messages
633
zontar said:
just curious, how do you do the "Event:
Ownership of region is switched to team X " ?

cant find it anywhere under events :roll:

it doesn't exist, its bullshit, and i CAN tell you how to make that, but i'm just too damn lazy...
Well, alright, i'll be nice for once.
You are going to need 2 triggers each zone, and multiple variables, first, the variables:

---

Code:
Var_zone_controller (Array X)
Var_Player_zones (Array X)
Var_Zone_structure (Array 14)
Var_zone_taken (Array 14)
X = number of players. So set the variable array to the player number of the triggering player.
14= the number of zones you have, so one array size for each zone.

---

Now, the first trigger, this will be the one to take control of the zone.

Code:
Capture zone 1
    Events
        Unit - A unit enters Zone 1 <gen>
    Conditions
        Var_zone_taken[1] Equal to False
        ((Triggering unit) is A structure) Equal to True
    Actions
        Set Var_Zone_structure[1] = (Entering unit)
        Set var_zone_controller[1] = (Owner of (Entering unit))
        Set Var_zone_taken[1] = True
        Set var_player_zones[(Player number of (Owner of (Entering unit)))] = (var_player_zones[(Player number of (Owner of (Entering unit)))] + 1)

What this does is basically set all the data so the game knows wheter a zone is taken or not, and which of the buildings is the zonecontroller.
It does not prevent more structures to be built there, but you can make that yourself, with an if/then/else trigger, the if would be the current conditions, then current actions, else, whatever you want.

---

Now, the second trigger, what happens when control over the zone is lost!

Code:
Lose zone 1
    Events
        Unit - A unit Dies
    Conditions
        (Dying unit) Equal to Var_Zone_structure[1]
    Actions
        Set Var_Zone_structure[1] = No unit
        Set var_zone_controller[1] = Neutral Passive
        Set Var_zone_taken[1] = False
        Set var_player_zones[(Player number of (Owner of (Dying unit)))] = (var_player_zones[(Player number of (Owner of (Dying unit)))] - 1)

There you go.

---

Now, last, the update!

Code:
Update Multiboard
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer A) + 1) to (String(var_player_zones[(Integer A)]))

Now, what this does, it puts the number of zones controlled in the right spot for each player... integer a from 1 to 10, there, the 10 means max number of players, so adjust that if needed.

I hope that helped, and i think it has, if you don't understand something, or need help, i've got the map i just made this code in saved on my pc, i can send it.

Also, the first two triggers work for the first zone only, you will have to copy, paste and adjust these for each zone.

Goodluck!

~Angelusz
 
Level 3
Joined
Oct 21, 2004
Messages
72
I posted that event because I was unawares as to how you were doing your region control detection.

Next time I'll assume that you don't know how to do all of it even though you said you did.

(Note the "Doing this from memory, I can find exact trigger if necessary" at the bottom of my post?)
 
Level 16
Joined
Sep 3, 2004
Messages
2,086
If this is like Domination, you simply give them Circles of Power with the locust ability. When someone captures it, change the owner to like Player Blue/Red, changing color, then Neutral Passive or Neutral Extra, retaining color. Then check every 10 seconds if the owner of X circle is neutral extra, then give X team a point and so on
 
Level 3
Joined
Jul 5, 2004
Messages
38
it is actually somethin like domination but it has more then one spawnpoint... anyways i now know i am triggering on a complete different lvl then u guys... have to learn more about variables

( this doesnt mean i cant get anything to work, cuz i know have everything working.. but it aint with lots of variables and stuff )

:p
 
Level 3
Joined
Jul 5, 2004
Messages
38
so in the map i have to change map author... instead of the Zontar/Dutching thing i have to rename it to zontar? well that was kinda easy... why didnt i thought about that before?
 
Status
Not open for further replies.
Top