Author Topic: Team Territory  (Read 418 times)

I'm having some trouble with the events. How do i get it so that the big 16x16 will be capture able when all the other capture points are captured under "Lets say team blue." And if there not all captured the 16x16 wont be able for "Lets say team red" to capture.

"Does anyone get what I'm saying and if you don't DO NOT COMMENT! i have trouble with people saying "Huh" "What" "I have no clue what your saying" AND CRAP LIKE THAT!

Huh, what?

Lol jk, I get what you are saying and I wish I could help you, but I have little to no experience with that game mode. Sorry  :panda:

Huh, what?

Lol jk, I get what you are saying and I wish I could help you, but I have little to no experience with that game mode. Sorry  :panda:
Thx for trying

Thx for trying
I feel stupid that wasn't a try that was and

"Oh."

Lets see.  I'm at work so I can't really test this out till I get home.  Also I can't really understand you so I'm just guessing at what you need to know.  But I can theorize so...  

You'd need to name each of the capturepoints something unique.  Ill use the following in this example.

BluCap1
BluCap2
EndCap

The point is for EndCap not to be capturable until BluCap 1 and 2 are captured.

So the events for both BluCap1 and BluCap2 would be...

OnTeam1Capture self vcemodvariable captured set 1
OnTeam2Capture self vcemodvariable captured set 2
Onminigamereset self vcemodvariable captured set 0

That last event changes depending on what brick you used.  If you used a Team 1 capture point(or something similar) the "set 0" needs to be a "set 1" or "set 2".  It really depends on who owns the capturepoint when the minigame starts.  If the capture point is a neutral capture point(ie it doesn't belong to anyone at the beginning of the minigame) then the variable can just be "set 0".

The end-game capture is a little different.  It needs to check if the other capture points have been captured before it even lets anyone capture.  I don't really remember what the events are that come with the CTF mod.  So, if there's an event that is triggered when someone tries to capture the point, great.  Otherwise you'll need a cage or something to protect it.  Anyhow...

0 0 Onwhatever self vce_ifvalue <var:nb_BluCap1:captured> == 1   1 2
1 0 onvariablefalse client chatmessage <color:FFFFFF>Point 1 is not captured!
2 0 onvariabletrue self vce_ifvalue <var:nb_BluCap2:captured> == 1  3 4
3 0 onvariablefalse client chatmessage <color:FFFFFF>Point 2 is not captured!
4 0 onvariabletrue (something that lets the players have access to the cap point)

Hopefully that's it.  As I said I'm at work so I can't really test it out.

You'll need VCE and minigame events for my method to work.  You'll also need a little intelligence.

Good luck!  :iceCream:

Fyi, the Slayer event to prevent a CP from being captured is called "setControlLocked".

Code: [Select]
Dglider, for the missing input, I usually use a universal check among all CPs.

Your example is almost right, it uses the correct events, but OP wanted all caps to be neutral, with one cap specific to the team.  Therefore, in my helping the OP, my CPs are Point_N_1 and Point_N_2 for neutrals, and Point_B and Point_Red for blue and red CPs.  Also, for future reference and a good life lesson, organize your brick naming better.  When I started out, I just used single letters to represent bricks.  But, as I got better and builds got bigger, and single letters turned into double and triple letters, I changed naming to something similar to how you name yours now- BluCap1- with abbreviations and a compound name, like StLight for street light and HsLight for house light.  Although the makes sense in reading it, it is bad organization.  Hs and St are no where near each other in the alphabet, so instead, flip them, so Light is the first word.  Also, putting a _ between the words can help better distinguish between brick names when you get long, multi hundred-long lists of brick names.

And use the code to for events, it makes everything more neat, that's [code ]
.

Anyway.

Point_N_1
Code: [Select]
[0] [Onteam1Capture] [Self] [VCE_Ifvalue] [<var:nb_Point_N_2:captured>] [==] [1]
[1] [Onvariabletrue] [Named Brick] [Point_Red] [setcontrolocked] [ ]
[2] [Onvariabletrue] [Minigame] [MinigameCenterprintAll] [Red is now open for siege] [3]

Adding other things like line 2 make for a more detailed game.  Repeat the above events for Point_N_2 and change the "nb_Point_N_2" to "nb_Point_N_1", and change "Point_Red" to "Point_Blue."