Please or Register to create posts and topics.

Logic_eventlistener Event List?

So I'd like to use some more functions in my Portal 2 map to detect certain things I can't do with regular entities. Apparently, this entity is completely undocumented on the wiki, saying absolutely nothing about what any of the events are or how to find them. The only place I can figure out codes from are post on this forum, only including "player_death" and "player_landed".

any list or cheat to find them would be great.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

Turn on "display_game_events", and events will be printed to the console when they fire.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

Wow.. this one took some digging :)
You can find a little more information about this on this VDC page.. more importantly the name of those two files... which were buried in the pak01.dir file... the second file had possibly more of what you was after under "modevents" which seem more specific to Portal 2... .

I've copied "the list" here in code blocks but please take note of the following line

=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========

...and I damn hope posting this information doesn't violate that copyright...

Code: Select all
// No spaces in event names, max length 32
// All strings are case sensitive

"gameevents"
"team_info"            // info about team
{"teamid"   "byte"      // unique team id
"teamname"   "string"   // team name eg "Team Blue"
}
   
"team_score"            // team score changed
{"teamid"   "byte"      // team id
"score"      "short"      // total team score
}
   
"teamplay_broadcast_audio"   // emits a sound to everyone on a team
{"team"   "byte"         // unique team id
"sound"   "string"      // name of the sound to emit
}
   
//////////////////////////////////////////////////////////////////////
// Player events
//////////////////////////////////////////////////////////////////////
   
"player_team"            // player change his team
{"userid"   "short"      // user ID on server
"team"      "byte"      // team id
"oldteam" "byte"      // old team id
"disconnect" "bool"   // team change because player disconnects
"autoteam" "bool"      // true if the player was auto assigned to the team
"silent" "bool"         // if true wont print the team join messages
}
   
"player_class"            // a player changed his class
{"userid"   "short"      // user ID on server
"class"      "string"   // new player class / model
}
   
"player_death"            // a game event, name may be 32 charaters long
{"userid"   "short"      // user ID who died            
"attacker"   "short"       // user ID who killed
}
   
"player_hurt"
{"userid"   "short"      // player index who was hurt            
"attacker"   "short"       // player index who attacked
"health"   "byte"      // remaining health points
}
   
"player_chat"            // a public player chat
{"teamonly"   "bool"      // true if team only chat
"userid"    "short"      // chatting player
"text"        "string"   // chat text
}
   
"player_score"            // players scores changed
{"userid"   "short"      // user ID on server
"kills"      "short"      // # of kills
"deaths"   "short"      // # of deaths
"score"      "short"      // total game score
}
   
"player_spawn"            // player spawned in game
{"userid"   "short"      // user ID on server
}
   
"player_shoot"            // player shoot his weapon
{"userid"   "short"      // user ID on server
"weapon"   "byte"      // weapon ID
"mode"      "byte"      // weapon mode
}
   
"player_use"
{"userid"   "short"      // user ID on server
"entity"   "short"      // entity used by player
}
   
"player_drop"
{"userid"   "short"      // user ID on server
"entity"   "short"      // entity used by player
}

"player_changename"
{"userid"   "short"      // user ID on server
"oldname"   "string"   // players old (current) name
"newname"   "string"   // players new name
}

"player_hintmessage"
{"hintmessage"   "string"   // localizable string of a hint
}

//////////////////////////////////////////////////////////////////////
// Game events
//////////////////////////////////////////////////////////////////////

"game_init"            // sent when a new game is started
{   }
      
"game_newmap"            // send when new map is completely loaded
{"mapname"   "string"   // map name
}
   
"game_start"            // a new game starts
{"roundslimit"   "long"      // max round
"timelimit"   "long"      // time limit
"fraglimit"   "long"      // frag limit
"objective"   "string"   // round objective
}
   
"game_end"            // a game ended
{"winner"   "byte"      // winner team/user id
}
   
"round_start"
{"timelimit"   "long"      // round time limit in seconds
"fraglimit"   "long"      // frag limit in seconds
"objective"   "string"   // round objective
}
   
"round_end"
{"winner"   "byte"      // winner team/user i
"reason"   "byte"      // reson why team won
"message"   "string"   // end round message
}
   
"game_message"            // a message send by game logic to everyone
{"target"   "byte"      // 0 = console, 1 = HUD
"text"      "string"   // the message text
}

"break_breakable"
{"entindex"   "long"
"userid"      "short"
"material"   "byte"   // BREAK_GLASS, BREAK_WOOD, etc
}

"break_prop"
{"entindex"   "long"
"userid"   "short"
}

"entity_killed"
{"entindex_killed"    "long"
"entindex_attacker"   "long"
"entindex_inflictor"   "long"
"damagebits"      "long"
}
   
"bonus_updated"
{"numadvanced"   "short"
"numbronze"   "short"
"numsilver"   "short"
"numgold"   "short"
}
   
"achievement_event"
{"achievement_name"   "string"   // non-localized name of achievement
"cur_val"      "short"      // # of steps toward achievement
"max_val"      "short"      // total # of steps in achievement
}

"physgun_pickup"
{"entindex"      "long"      // entity picked up
}

"flare_ignite_npc"
{"entindex"      "long"      // entity ignited
}

"helicopter_grenade_punt_miss"
{   }

"user_data_downloaded"   // fired when achievements/stats are downloaded from Steam or XBox Live
{   }

"ragdoll_dissolved"
{"entindex"   "long"
}
   
"gameinstructor_draw"
{   }
   
"gameinstructor_nodraw"
{   }
   
"map_transition"
{   }
   
"entity_visible"
{"userid"      "short"      // The player who sees the entity
"subject"      "long"      // Entindex of the entity they see
"classname"      "string"   // Classname of the entity they see
"entityname"   "string"   // name of the entity they see
}
   
"set_instructor_group_enabled"
{"group"      "string"
"enabled"   "short"
}
   
"instructor_server_hint_create" //create a hint using data supplied entirely by the server/map. Intended for hints to smooth playtests before content is ready to make the hint unneccessary. NOT INTENDED AS A SHIPPABLE CRUTCH
{"hint_name"    "string"   // what to name the hint. For referencing it again later (e.g. a kill command for the hint instead of a timeout)
"hint_replace_key"         "string"   // type name so that messages of the same type will replace each other
"hint_target"            "long"      // entity id that the hint should display at
"hint_activator_userid"      "short"      // userid id of the activator
"hint_timeout"            "short"       // how long in seconds until the hint automatically times out, 0 = never
"hint_icon_onscreen"      "string"   // the hint icon to use when the hint is onscreen. e.g. "icon_alert_red"
"hint_icon_offscreen"      "string"   // the hint icon to use when the hint is offscreen. e.g. "icon_alert"
"hint_caption"         "string"   // the hint caption. e.g. "#ThisIsDangerous"
"hint_activator_caption"   "string"   // the hint caption that only the activator sees e.g. "#YouPushedItGood"
"hint_color"         "string"   // the hint color in "r,g,b" format where each component is 0-255
"hint_icon_offset"      "float"      // how far on the z axis to offset the hint from entity origin
"hint_range"         "float"      // range before the hint is culled
"hint_flags"         "long"      // hint flags
"hint_binding"         "string"   // bindings to use when use_binding is the onscreen icon
"hint_gamepad_binding"      "string"   // gamepad bindings to use when use_binding is the onscreen icon
"hint_allow_nodraw_target"   "bool"      // if false, the hint will dissappear if the target entity is invisible
"hint_nooffscreen"         "bool"      // if true, the hint will not show when outside the player view
"hint_forcecaption"         "bool"      // if true, the hint caption will show even if the hint is occluded
"hint_local_player_only"   "bool"      // if true, only the local player will see the hint
}
   
"instructor_server_hint_stop" //destroys a server/map created hint
{"hint_name"      "string"   // The hint to stop. Will stop ALL hints with this name
}
}

Code: Select all
// No spaces in event names, max length 32
// All strings are case sensitive
//
// valid data key types are:
//   string : a zero terminated string
//   bool   : unsigned int, 1 bit
//   byte   : unsigned int, 8 bit
//   short  : signed int, 16 bit
//   long   : signed int, 32 bit
//   float  : float, 32 bit
//   local  : any data, but not networked to clients
//
// following key names are reserved:
//   local      : if set to 1, event is not networked to clients
//   unreliable : networked, but unreliable
//   suppress   : never fire this event
//   time   : firing server time
//   eventid   : holds the event ID

"ModEvents"
{
"portal_player_touchedground"   // player landed
{"userid"   "short"      // user ID on server
}

"portal_player_ping"   // player pinged
{"userid"   "short"      // user ID on server
"ping_x"   "float"
"ping_y"   "float"
"ping_z"   "float"
}
   
"portal_player_portaled"      // player traveled through a portal
{"userid"   "short"      // user ID on server
"portal2"   "bool"      // false for portal1 (blue)
}
"turret_hit_turret"
{   }
"security_camera_detached"
{   }
"challenge_map_complete"
{"numbronze"   "short"
"numsilver"   "short"
"numgold"   "short"
}
"advanced_map_complete"
{"numadvanced"   "short"
}
"quicksave"
{   }
"autosave"
{   }
"slowtime"
{   }
"portal_enabled"
{"userid"      "short"      // user ID on server
"leftportal"   "bool"
}
   
"portal_fired"
{"userid"      "short"      // user ID on server
"leftportal"   "bool"
}
   
"gesture_earned"
{"userid"   "short"      // user ID on server
"teamtaunt"      "bool"
}
   
"player_gesture"
{"userid"   "short"      // user ID on server
"air"      "bool"
}

"player_zoomed"
{"userid" "short"
}

"player_unzoomed"
{"userid" "short"
}
   
"player_countdown"
{"userid"   "short"      // user ID on server
}
   
"player_touched_ground"
{"userid"   "short"
}
   
"player_long_fling"
{"userid"   "short"
}
   
"remote_view_activated"
{     }
   
"touched_paint"
{"userid" "short"
"painttype" "short"
"surfacedir" "short"
}
"player_paint_jumped"
{"userid" "short"
}
"move_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"movedone_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"counter_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"zoom_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"jump_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"partnerview_hint_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"paint_cleanser_visible"
{"userid"   "short"   //The player who sees the entity
"subject"   "long"   //Entindex of the entity they see
}
"paint_cleanser_not_visible"
{"userid"   "short"
}
"player_touch_paint_cleanser"
{"userid"   "short"
"subject"   "long"   //Entindex of the cleanser
}
"bounce_count"
{"userid"   "short"
"bouncecount"   "short"
}
"player_landed"
{"userid"   "short"
}
"player_suppressed_bounce"
{"userid"   "short"
}
"OpenRadialMenu"
{"target" "string"
}
"AddLocator"
{"userid" "short"
"subject" "short"
"caption" "string"
}
"player_spawn_blue"
{   }
"player_spawn_orange"
{   }
"map_already_completed"
{   }
"achievement_earned"
{"player"   "byte"      // entindex of the player
"achievement"   "short"      // achievement ID
}
   
"replay_status"
{   }
   
"spec_target_updated"
{   }
   
"player_fullyjoined"
{"userid"   "byte"      // entindex of the player
"name" "string"
}
   
"achievement_write_failed"
{   }
   
"player_stats_updated"
{"forceupload" "bool"
}
   
"round_start_pre_entity"
{   }

"teamplay_round_start"         // round restart
{"full_reset"   "bool"      // is this a full reset of the map
}
   
"client_disconnect"
{   }
   
"server_pre_shutdown"       // server is about to be shut down   
{"reason"   "string"   // reason why server is about to be shut down
}
   
"difficulty_changed"
{"newDifficulty"   "short"
"oldDifficulty"   "short"
"strDifficulty" "string" // new difficulty as string
}
   
"finale_start"
{"rushes"      "short"
}

"finale_win"
{"map_name"      "string"
"difficulty"   "short"
}

"vote_passed"
{"details"      "string"
"param1"      "string"
"team"         "byte"
"reliable"      "1"      // this event is reliable
}

//////////////////////////////////////////////////////////////////////
// Economy events
//////////////////////////////////////////////////////////////////////
"inventory_updated"
{   }
"cart_updated"
{   }
"store_pricesheet_updated"
{   }
"gc_connected"
{   }
"item_schema_initialized"
{   }
"client_loadout_changed"
{   }
"gameui_activated"
{   }
"gameui_hidden"
{   }
}

Yea the console command dint really do anything, even when cheats and dev mode were on, so thank you for that good list.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

Excellent, this will be really useful.

Falsi sumus crusto!

I second the notion, this is a really great thing to know about. Of interest are the paint-related events, which might make music and such easier.

ImageImage

OK, so I want to fire an output when the user stops playing my map but I can't achieve it.

I've tried as the event on the logic_evenlistener:

- client_disconnect
- player_disconnect
- server_pre_shutdown

No one seems to fire my output; but on the other hand: how would it be possible that an output could be fired right when the player exits from the map where all entities involved in my output are gone? >.<

What kind of outputs can be fired when the player stops playing a map? can I at least fire a console command to bind a key?

Any help would be highly welcome.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Eventify is the event management and registration platform. Use our customizable event management software to build engaging mobile event apps and websites.

To know more, please visit:-

Event App

Event Software

Event Planning Software

Networking App