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

[TF2] Get which team can cap and set capture point owner.


Post New Thread Reply   
 
Thread Tools Display Modes
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 12-11-2014 , 14:31   Re: [TF2] Get which team can cap and set capture point owner.
Reply With Quote #11

Quote:
Originally Posted by Inhib View Post
Try
PHP Code:
SetEntProp(entityProp_Sendm_iOwnerownerteamindex
Not sure if Prop_Send or Prop_Data, try both, would appreciate it if someone could tell me the difference between the two as well.
Ownerteamindex is 2 or 3 depending on blue or red, not sure which is which.
Neither "m_iOwner", "m_iTeam" or "m_nOwningTeam" work for team_control_point or trigger_capture_area.

but
SetVariantInt(nTeam);
AcceptEntityInput(closest,"SetOwner",0,0);

did the trick!
I'm still need to know how to get if a team can cap a X point. So if team blue has the first point, and the red the 5th, and then can cap the 2nd/4th I would set them as capped so both teams will go for the 3rd (middle) point. I don't want to hardcode this with the capture point names :/
ClassicGuzzi is offline
Inhib
Member
Join Date: Oct 2014
Old 12-13-2014 , 04:33   Re: [TF2] Get which team can cap and set capture point owner.
Reply With Quote #12

Quote:
Originally Posted by ClassicGuzzi View Post
Neither "m_iOwner", "m_iTeam" or "m_nOwningTeam" work for team_control_point or trigger_capture_area.

but
SetVariantInt(nTeam);
AcceptEntityInput(closest,"SetOwner",0,0);

did the trick!
I'm still need to know how to get if a team can cap a X point. So if team blue has the first point, and the red the 5th, and then can cap the 2nd/4th I would set them as capped so both teams will go for the 3rd (middle) point. I don't want to hardcode this with the capture point names :/
Go to your server console, type sm_dump_netprops netprops.txt and sm_dump_datamaps datamaps.txt. Look for those two text files in your mod folder, I think it should be the /tf or /cs folder. Look for the properties of team_capture_point, one of them might be the team owner, you can read that parameter to see which team owns it.

Can't help you check cos I'm on mobile
Inhib is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 12-13-2014 , 12:27   Re: [TF2] Get which team can cap and set capture point owner.
Reply With Quote #13

Quote:
Originally Posted by Inhib View Post
Go to your server console, type sm_dump_netprops netprops.txt and sm_dump_datamaps datamaps.txt. Look for those two text files in your mod folder, I think it should be the /tf or /cs folder. Look for the properties of team_capture_point, one of them might be the team owner, you can read that parameter to see which team owns it.

Can't help you check cos I'm on mobile
I already know the default owner with "m_iDefaultOwner" my problem is that I need to know the capture order of the points, and not every maps with five points uses 0 for the first point and and 4 for the last one. For example, in cp_orange_asylum the 1st point is the one that has the "m_iPointIndex" in zero, and the last point (or first red point) is 4; but in cp_orange_cross, the first blue and red point are 0 and 1. I need to know who is able to capture what point in what order.

Thanks for all the help by the way!
ClassicGuzzi is offline
Inhib
Member
Join Date: Oct 2014
Old 12-13-2014 , 19:33   Re: [TF2] Get which team can cap and set capture point owner.
Reply With Quote #14

Quote:
Originally Posted by ClassicGuzzi View Post
I already know the default owner with "m_iDefaultOwner" my problem is that I need to know the capture order of the points, and not every maps with five points uses 0 for the first point and and 4 for the last one. For example, in cp_orange_asylum the 1st point is the one that has the "m_iPointIndex" in zero, and the last point (or first red point) is 4; but in cp_orange_cross, the first blue and red point are 0 and 1. I need to know who is able to capture what point in what order.

Thanks for all the help by the way!
There's a team_capture_point property in hammer which defines which point must be captured to unlock a point, not sure if it exists in game. If it does, search for a point with a null value(which shd be the last) look for the cp which is unlocked by last, that shd be 2nd and 4th.
Inhib is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-13-2014 , 20:52   Re: [TF2] Get which team can cap and set capture point owner.
Reply With Quote #15

I started writing a long post about cp stuff, but to put it shortly: There are a lot of datamaps on the team_control_point_master, team_control_point_round, and tf_objective_resource entities that control how CPs work.

Especially tf_objective_resource... any 8 item array (with 000 to 007 keys) are describing control points. Said keys are control point index values.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-13-2014 at 20:54.
Powerlord 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 02:14.


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