Raised This Month: $51 Target: $400
 12% 

[TF2] Freeze Tag - Updated (1.1.4) 5/12/2013


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-11-2013 , 12:23   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #61

Quote:
Originally Posted by Powerlord View Post
How are you setting this? team_control_point_master has two methods for controlling who wins: SetWinner and SetWinnerAndForceCaps.



Each team has its own game_round_win entity. Make sure you check which team owns it first.

Having said that, it appears the blue RoundWin is normally only called by the last control point of the last round (Source: TF2/Creating a CP assault map). You may need to call each team_control_point_round's OnWonByTeam2 instead. The problem then is figuring out which one controls which round. To do that, you have to check each one's m_nPriority; the one with the highest m_nPriority is the first round, the second highest is the second round, etc...

This is still going to cause issues on tc_ maps, though.
TC maps work just fine sending setwin (team) to team_control_point_master.

Using this:
Code:
                new tcpm = FindEntityByClassname2(-1, "team_control_point_master");
		if (tcpm == -1)
		{
			tcpm = CreateEntityByName("team_control_point_master");
			DispatchSpawn(tcpm);
			AcceptEntityInput(tcpm, "Enable");
		}
		SetVariantInt(team);
		AcceptEntityInput(tcpm, "SetWinner");
It works the same if i use the existing maps TCM or spawn a new one. The only thing that can really change is how the map scores points (1 per cap) or if it switches teams after doing it.

I've been working with dustbowl, it has only 1 game_round_win, and the team is set to blue. It's also set to switch teams.
I'll try using SetWinnerAndForceCaps. Perhaps that will work for blue.
Edit- OK it caps them with this, and says 3 more 2 more 1 more area to capture, but it does not open/close gates and doors properly. Like, If I use it on the first round, it will trigger a win for blue, but then the func_Brush and such is still there blocking the second area.

What I need is a method that will allow me to either: reliably execute the map's default win methods, or a way to trigger a win/loss reliably to reset game entities.
If I trigger game_round_win or create new ones, it will restart the round, but it will not reset the entities properly (gates, control point status, etc).

What people want to be able to do is something like - run freezetag along side a game of dustbowl.
If you get frozen, your teammates can revive you on the battlefield. If all of your teammates get frozen, the round will restart.
Otherwise, you should be able to play normally.

Right now I'm thinking that I can just edit team_round_timer
If I set that to 1, it will tick down to 0, and give red a win, and reset the map properly (I think) as it's like red defended.
I have to make sure that I adjust setup length / prevent it from being set to 1 because that will just end setup and start the normal timer.

I'm thinking about going with this though...
If the map has a game_round_win (or perhaps team_control_point_round) and a team_round_timer, i'll set the team_round_timer to 1 to trigger all FT round wins.
Otherwise i'll use the team_control_point_master method.

Reading back
- I have a sure method that will work for red, I can just set the round time to 1, and it will give them the win.
- For blue, I have no idea how to decide which team_control_point_round I would need to trigger in the current round. I can find them all, but how can I tell if it's active? I also need to be able to deal with things like when all players leave the server and the map restarts with waiting for players and all entities reset. So knowing what round is what doesn't help me very much, I kind of need to know which one it is right now. I could possibly try to track them, but I don't think I can do that reliably.. I sort of am doing it in this test verison with waiting for players, but it's a hassle. Need an event for waiting for players.

Also, what of these on team_control_point_master:
- InputRoundSpawn (Input)(0 Bytes) - RoundSpawn
- InputRoundActivate (Input)(0 Bytes) - RoundActivate

I'm guessing I can force it to spawn different rounds, though I don't really want to do this. I need to get what round it's currently on. It doesn't look like there's any value it's got that I can grab the current round out of. There must be some entity somewhere that has which team_control_point_round is active :S

It's looking like the trigger_capture_areas controls the entities, so I think I need to manually pop whichever one is supposed to be triggered.
Been awhile since I've made CP maps, never made a multistage, so I'm not sure how they get managed/enabled/disabled. Gonna try sending them inputs and see what happens.
None of them are set to start disabled, but I can't noclip around and cap them.
It's got a bunch of inputs, but looking at the .cpp for the entity, it doesn't look like any will allow me to force it to become captured, or to fire oncapteam2, which it needs to do to open/close doors and such.

Last edited by friagram; 01-11-2013 at 13:46.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-11-2013 , 13:55   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #62

Quote:
Originally Posted by friagram View Post
Reading back
- I have a sure method that will work for red, I can just set the round time to 1, and it will give them the win.
- For blue, I have no idea how to decide which team_control_point_round I would need to trigger in the current round. I can find them all, but how can I tell if it's active? I also need to be able to deal with things like when all players leave the server and the map restarts with waiting for players and all entities reset. So knowing what round is what doesn't help me very much, I kind of need to know which one it is right now. I could possibly try to track them, but I don't think I can do that reliably.. I sort of am doing it in this test verison with waiting for players, but it's a hassle. Need an event for waiting for players.

Also, what of these on team_control_point_master:
- InputRoundSpawn (Input)(0 Bytes) - RoundSpawn
- InputRoundActivate (Input)(0 Bytes) - RoundActivate

I'm guessing I can force it to spawn different rounds, though I don't really want to do this. I need to get what round it's currently on. It doesn't look like there's any value it's got that I can grab the current round out of. There must be some entity somewhere that has which team_control_point_round is active :S
The teamplay_round_selected event should be able to tell you the name of the current round as it starts, which should correspond to the m_iName (I think) of one of the team_control_point_round entities. Note: I've never tried this, so I can't vouch that it actually works.

Quote:
Originally Posted by friagram View Post
It's looking like the trigger_capture_areas controls the entities, so I think I need to manually pop whichever one is supposed to be triggered.

Been awhile since I've made CP maps, never made a multistage, so I'm not sure how they get managed/enabled/disabled. Gonna try sending them inputs and see what happens.
None of them are set to start disabled, but I can't noclip around and cap them.
They've got some inputs I think:
InputCaptureCurrentCP (Input)(0 Bytes) - CaptureCurrentCP
Might work?
I don't have any map making experience. I know that maps like gravelpit can use the BLU Previously required point x inputs and the like, but I think the team_control_point_round or team_control_point_master usually calls inputs on control points and capture areas as appropriate, as long as you have the control point indexes set up in the proper order (0-7) (from RED to BLU in 5cp).
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 01-11-2013 at 14:02.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-11-2013 , 14:06   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #63

The problem is that it's the trigger_capture_area that sets the entity state of the doors/func_brushes.
I think that if i make a new TCPM and trigger that for blue, it will force all control points on the map to be captured, and will restart the map from scratch - this seems to work, but it's a crappy thing to do.

Perhaps I can just issue a stalemate if blue gets a win, and do the timer thing for red.
There doesn't seem to be any way to force a trigger_capture_area to fire off it's outputs.

As far as waiting for players goes, is there a surefire way to know when that is going on? I haven't had any luck with the events:
26 teamplay_waiting_begins
27 teamplay_waiting_ends
28 teamplay_waiting_abouttoend
29 teamplay_restart_round
30 teamplay_ready_restart
31 teamplay_round_restart_seconds

Perhaps round_restart_seconds might work, if i compare it to waitingforplayerstime, but not even sure if that event works.

Last edited by friagram; 01-11-2013 at 14:11.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-11-2013 , 14:35   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #64

Quote:
Originally Posted by friagram View Post
As far as waiting for players goes, is there a surefire way to know when that is going on? I haven't had any luck with the events:
26 teamplay_waiting_begins
27 teamplay_waiting_ends
28 teamplay_waiting_abouttoend
29 teamplay_restart_round
30 teamplay_ready_restart
31 teamplay_round_restart_seconds

Perhaps round_restart_seconds might work, if i compare it to waitingforplayerstime, but not even sure if that event works.
Use SourceMod's TF2_OnWaitingForPlayersStart and/or TF2_OnWaitingForPlayersEnd
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 01-11-2013 at 14:36.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-11-2013 , 14:38   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #65

LoL.. thanks this will help me a ton.

It seems that I can just issue a stalemate win to the TCPM. It will restart the round, but not reset the entities - control points and such will remain capped, gates opened where they were left off, but atleast the game can move forward.

Setting time to 1 on the clock will allow red to win and reset the map, swapping them over to blue =S
friagram is offline
Caliban Avenged
Junior Member
Join Date: Jun 2012
Old 01-13-2013 , 00:39   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #66

Friagram - congratulations on creating a brand new Freeze Tag mod! Finding it to be very popular in our second server.

One thing we noticed with the 1.0.7b version - it looks like we can consistently make it crash when someone equips the Medic's Vaccinator weapon. Anyone else reported this yet?
Caliban Avenged is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-13-2013 , 16:57   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #67

We have had no problems with the vaccinator, the mod doesn't do anything with that weapon, or anything that should have any impact on it that I know of. Do you have up to date sourcemod/tf2 items? And also, only in 1.0.7? Not other versions? Don't think there's much that I changed in that version, and I can't think of anything that could interfere with how the vaccinator works. The mod does store medigun charge/uber. If you get stuck in geometry, and respawned, it refunds it to you. As far as I kow, the vaccinator just works by giving various addconds to the player, but I don't touch any of them. Perhaps it's something with the medic charge being refunded, I can look into it later, but that hasn't changed and is in all of the other versions. Just noclip into a wall or something and have somone freeze near you, it should teleport you back to spawn with uber restored because it thinks you got displaced by the player who got frozen, and pushed into world geometry.

I've got a ton of additions in a new version that should be ready in a day or 2, just need to test some things:
- compatability with more map types/game modes (ctf/payload/capture points).
- support for multi-stage maps, they will progress.. if a team is eliminated, the round will reset where you left off in the match.
- ability to enable the game clock/setup doors/events on maps, as well as enable respawn rooms(and visualizers), class switching, and class queuing.
- ability to automatically respawn in spawnroom when unfrozen, rather than on the battlefield.
- ability to disable damage interrupting the automatic unfreeze countdown
- new ice model that only goes around the player's feet (more pointy/crystal like)
- ability to turn off the ice model if you don't want it.
- status rings only draw when players are stationary, so they don't skip around when players are in the air.
- disabling the mod by convar now unloads all of its hooks and listeners, so there's much less overhead if for some reason you don't unload plugins on a multimod server.
- lots of various bug fixes.

Also, I believe there is a problem with the current version of how it ends the game on multistage maps. It send a capture all control point message to the control point master, but on multi-stage maps, this can crash the server if red wins on the last round. I've fixed this in the version that I am working on. The simple solution is to set the team to 0 (stalemate) for any map that has a team_control_point_round in it. This will prevent the problem, and reset the round to it's current state. Other possible options are -> edit game timer to 1 second (forces red to win the game), or send a blue win to the team control point master (forces game restart with blue), or edit the game timer to 1 second and edit the game_win so that blue wins (blue wins by defending, also resets the game). Any option other than stalemating on multistage maps will completely reset the map and all entities. The only way that I have seen to force blue to progress is to somehow force the trigger_Capture_Areas to cap, which does not seem possible. So stalemate option is best option.

Last edited by friagram; 01-13-2013 at 17:13.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-13-2013 , 18:06   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #68

Quote:
Originally Posted by Caliban Avenged View Post
Friagram - congratulations on creating a brand new Freeze Tag mod! Finding it to be very popular in our second server.

One thing we noticed with the 1.0.7b version - it looks like we can consistently make it crash when someone equips the Medic's Vaccinator weapon. Anyone else reported this yet?
SourceMod had issues with the AddCond function when the Vaccinator was involved. This was fixed in SourceMod 1.5.0 hg3719 and newer.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-13-2013 , 18:41   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #69

I've been using vaccinator addconds on my peace-zones plugin to add the shield effect to people, and it's been fine on 3738/3742
friagram is offline
dstoler
Member
Join Date: Nov 2012
Old 01-13-2013 , 20:05   Re: [TF2] Freeze Tag - (1.0.0) 12/30/2012
Reply With Quote #70

First off I would like to say THANK YOU! Your plugin has spruced life back into my dying second server that I was ready to just close the doors on. Everyone loves it. I have only noticed one thing so far, Every once in awhile, someone will spawn when a new round starts with no visible weapons in their hands. It happened to me as soldier and I could shoot my invisible shotgun but my invisible rocket launcher would not fire. Once new round starts again it is fixed (or maybe on a different person) I ahve latest SM, MM and have not had this issue before until I installed this mod.

Don't want to sound like I am complaining as this is my first post on this site and I am a long time lurker.
Thanks again for the amazing work, looking forward to more updates!
dstoler is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode