GoldenEye: Source Forums

Debriefing => Questions, Help, & How To's => Topic started by: papel on June 23, 2017, 12:50:29 am

Title: Gameplay Events
Post by: papel on June 23, 2017, 12:50:29 am
Hello everybody, good night!

I need to know the name of the events from the Capture the Flag mode. For example the name of the event when a flag is caught. And also the event's name when the other team recovers the flag. I tried the page bellow to the developer but it is out.

http://wiki.geshl2.com/goldeneye/source_plugin_support#gameplay_event

Thanks and Sorry my english.

If it is possible of other modes as Arsenal and the Double kill, I will be more thankful.

Thank you so much!

Title: Re: Gameplay Events
Post by: Entropy-Soldier on June 23, 2017, 07:38:49 am
Gameplay python files are in "gesource\python\ges\GamePlay", they have the extension .py and are text files so you can open them in a text editor of your choosing.

Opening the desired one and searching "EmitGameplayEvent" will give you the calls that make gameplay events, so search through the desired gameplay file if I don't list everything you need here.  You can even add your own if you need to, though this will mark the gameplay as modded on the server list/scoreboard.

Anyway, for CTF the events are:

"ctf_tokendefended" with parameters killedID, victimID, teamDefendedAgainst, weaponUsed

"ctf_tokenpicked" with parameters playerID, teamTokenBelongsTo

"ctf_tokendropped" with parameters playerID, teamTokenBelongsTo

"ctf_tokencapture" with parameters capturerID, teamTokenBelongsTo

"ctf_overtime"


For Arsenal:

"ar_levelsteal" with parameters killerID, victimID

"ar_levelchange" with parameters playerID, level

"ar_completedarsenal" with parameters playerID



YOLT

"yolt_eliminated" with parameters victimID, killerID, weaponClassname

"yolt_lastmanstanding" with parameters playerID, totalPlayerCount



Event names are more or less self-explanatory but if you need any clarification as to how any of them work or under what conditions they fire let me know.
Title: Re: Gameplay Events
Post by: PapaFox on June 23, 2017, 01:36:52 pm
Hello everybody!

I'm also trying to deploy a plugin for  Capture The Flag.
I tried to call the event, but the following exception was returned.
Exception reported: Game event "ctf_tokencapture" dos not exist

Remember that I used the following form:
HookEvent("ctf_tokencapture", Event_capture_flag);

Thanks and Sorry my english.
Title: Re: Gameplay Events
Post by: Entropy-Soldier on June 23, 2017, 11:05:28 pm
Code: [Select]
	// Tell plugins and achievements about specific gameplay events
// this may be transmitted to clients, the gameplay defines that behavior
"gameplay_event"
{
"ident" "string" // Identity of the current gameplay (deathmatch, mwgg, etc.)
"name" "string" // Name of the event (ctk_capture, lald_baronvoodoo, etc.)
"value1" "string" // Values 1 - 4 are dictated by the specific event
"value2" "string" // See the wiki for more information!
"value3" "string" // http://wiki.goldeneyesource.net/index.php/GoldenEye:_Source_Scenario_Summary
"value4" "string"
}


Hook "gameplay_event" and check the "name" parameter for whatever event you're looking for. 
Title: Re: Gameplay Events
Post by: papel on June 24, 2017, 01:25:59 am
This is amazing!!!!
I will try to introduce these events in the plugin and I come back here to comment.
Entropy-Soldier, thank you!
Title: Re: Gameplay Events
Post by: PapaFox on July 03, 2017, 02:11:40 pm
Ok, thanks for the help, it worked.