GoldenEye: Source Forums

Debriefing => Impressions & Feedback => Topic started by: Joe on April 20, 2014, 05:14:55 pm

Title: New Python API Callback: OnPlayerChangedTeam(player,oldTeam,newTeam,autoBalance)
Post by: Joe on April 20, 2014, 05:14:55 pm
Hi,

This new call back function would help to simplify and reduce the amount of code in my Die Another Day mode's script.
Title: Re: New Python API Callback: OnPlayerChangedTeam(player,oldTeam,newTeam,autoBalance)
Post by: killermonkey on April 20, 2014, 10:38:41 pm
Why doesn't CanPlayerChangeTeam callback work for you?
Title: Re: New Python API Callback: OnPlayerChangedTeam(player,oldTeam,newTeam,autoBalance)
Post by: Joe on April 22, 2014, 11:48:18 am
Being a query function instead of an event callback, script writers shouldn't include code in CanPlayerChangeTeam() which assumes that the queried player will have their team changed after a call to this function returns true.

The auto balance calls this function for every member of a team before choosing the member who will have their team changed.
Title: Re: New Python API Callback: OnPlayerChangedTeam(player,oldTeam,newTeam,autoBalance)
Post by: killermonkey on April 22, 2014, 09:46:07 pm
Touché!