Author Topic: Team Deathmatch Events, setTeamAllied Problem  (Read 811 times)

  I'm making my D-Day build and I ran across a problem with TDMs event, setTeamAllied. Whenever I revert the control of a spawn point to the default owners, for example, on brick Axis_Spawn_Bunker going from Allied to Axis control and the mini-game resets (That's when the control is flipped) Allied players will sometimes spawn at the Axis_Spawn_Bunker bricks when they're meant to spawn at the newly given control of the Allied_Spawn_Lander brick, (All bricks are reverted control on reset, and yes I know I explain stuff badly :c) the Axis players will also spawn at their old spawn location, the 2nd phase area of the TDM, Axis_Spawns_Trench. To fix this I need ot reset the mini-game twice in a row which I don't find is appealing.



Thanks in advance, need your guys' help!

Quick thought, I'm using the event onMinigameReset, I've tried using onTeamCaptureReset but it didn't work for some reason... At all. Maybe it's the input I'm using, anyway, help!

Double post, no edit, I went through the script and it seems that the event onTeamCaptureReset is for neutral capture points, does this mean I could make the point not start off as team 2 and have it turn into team two on minigame start up and the events will work?

Also note, I'm using a custom team 2 capture point, it's a 16x16, I wonder why that wasn't put as default as the team 1 capture was.

I'll check into the scripts to see if the newly made brick has to be associated into it and stuff for the event.

Hope this post helps some.

Bump from page two, need this answered. :c

There wasn't a large Team 2 point since that's more for 1-way attacks (where you get your entire team to attack the point) or a 'center' zone than every individual area which makes rounds take ages to end or stalemate due to nobody being able to get an entire force to places where one team is respawning near instantly on top of you.

Does it work if you try it with the normal smaller capture points?

Does it work if you try it with the normal smaller capture points?
No, it never gets called, it seems. I added in an event that echo's when it's called and I never receive the echoed message, so it seems that it doesn't work. I tried with the team 1 16x16 point and the team 2 small point.

No edit so... I just tested something out, I used the neutral point and the event was called, seems odd that it would only work for the neutral capture points...

onTeamCaptureReset only occurs on the neutral points since they are the only ones set to no team at any point. Get Destiny's onMinigameReset event, perhaps.

How many points do you have overall and how many spawn rooms are there? Then I can try writing out some events as an example.

I read over my posts and I realized I didn't make it clear of what I was talking about, I was talking about the event onTeamCaptureReset.

Just tested something out, with the setTeamAllied, even by using the event onTeamCaptureReset it seems that the spawn points that I'm shifting don't get shifted BEFORE the players spawn, seems like a problem with it. In my opinion I think the event should be called just before the round restarts, (When the round ends there's a 5 second timer, make the event called at the start of that) although by normally reseting the mini-game it seems it wouldn't be called. Space, find a way to fix this please. :D


To your new post:

I've already tried using his event, and it didn't work.

Currently there's one point, and then there's 3 spawns, Attacker start, Defender start, and Defender end. When attackers take the point the attackers spawns move to the Defender start position, (they lose ownership of the attacker start area, becomes team 6) and the Defenders move to Defender end. When it restarts everything is put back to normal. That's when the problem occurs, at the beginning of the new round the players will spawn at their used-to-be spawns, and not at the regular spawn areas, so for example Attackers would spawn at Defender start and Defenders at Defender end.

Hope this clarifies some stuff.

How does the round end? You say there is one central point but how does that decide who wins?

You could trying using the Minigame->respawnAll event although it might be cleaner to just change the spawns around on round end. (since you can't control your player during that time)

How does the round end? You say there is one central point but how does that decide who wins?

You could trying using the Minigame->respawnAll event although it might be cleaner to just change the spawns around on round end. (since you can't control your player during that time)
The one central point starts off as Team 2's, and when Team 1 captures it they would have to capture a second point (It's not built yet, since I'm having problems with the spawns) to win. The spawns shift as they capture the first point, and then go back when they capture the second point, which wins team 1 the round. But team 2 would win in a time limit, exactly like siege.

While writing this I just realized that I don't have siege enabled, does it come with anything that would help my situation?

Try this:

(assuming Team 1 as attacking, Team 2 as defending)

spawnsBase1 is a set of spawn points inside the attackers' base.
spawnsForward1 is a set of spawn points near the center point.

Central Point (Large Neutral Capture Point) "cpCenter"
onTeam1Capture     -> NAMED BRICK: spawnsForward1 -> setTeamAllied     [1]
onTeam1Capture     -> NAMED BRICK: spawnsBase1    -> setTeamAllied     [NONE]
onTeam1Capture     -> NAMED BRICK: cpEndBase      -> setTeamCapturable [1] [YES]
onTeam2Capture     -> NAMED BRICK: spawnsForward1 -> setTeamAllied     [NONE]
onTeam2Capture     -> NAMED BRICK: spawnsBase1    -> setTeamAllied     [1]
onTeam2Capture     -> NAMED BRICK: cpEndBase      -> setTeamCapturable [1] [NO]
onTeamCaptureReset -> Self                        -> setTeamAllied     [2]
onTeamCaptureReset -> Self                        -> setTeamCapturable [ALL] [YES]

Final Point (Team 2 Capture Point) "cpEndBase"
onTeam1Capture -> Minigame                    -> roundEnd [1]
onTeam1Capture -> NAMED BRICK: spawnsForward1 -> setTeamAllied     [NONE]
onTeam1Capture -> NAMED BRICK: spawnsBase1    -> setTeamAllied     [1]
onTeam1Capture -> NAMED BRICK: cpEndBase      -> setTeamCapturable [1] [NO]
onTeam1Capture -> NAMED BRICK: cpCenter       -> setTeamCapturable [ALL] [NO]

If Siege is enabled then all points are automatically set to be owned by Team 2 (Defenders) at the start of a round. In that case replace "onTeamCaptureReset" with Destiny's "onMinigameReset" and remove the setTeamAllied [2] and roundEnd events.

This should only let Team 1 attempt to capture the end point if they own the center point, but Team 2 can attempt to recapture both at any time. Completely untested.