Skip to content

Add coop on/off functionality#4575

Open
Endernice61 wants to merge 9 commits intoBEEmod:devfrom
Endernice61:coop_on_off
Open

Add coop on/off functionality#4575
Endernice61 wants to merge 9 commits intoBEEmod:devfrom
Endernice61:coop_on_off

Conversation

@Endernice61
Copy link
Contributor

@Endernice61 Endernice61 commented Aug 21, 2025

Added enum for player teams in portal_man.nut
Added PortalGun class to store information about what portals the portal gun can shoot with method to apply it to an actual weapon_portalgun
No longer waits 2.5 seconds to find players as this method does not work for published maps
Added on_blue_spawn() and on_oran_spawn() which gets called by trigger created by compiler (see here). Calls _find_players() once both bots have spawned for the first time, or sets that bot's portal gun's keyvalues if that bot has already spawned.
_find_players() will now call in_hover_phase(), which waits until bots are able to move, then calls on_blue_spawn() and on_oran_spawn() to set up portal gun keyvalues
init(blue, orange, has_onoff initializes PortalGun classes for both bots
return_pgun() will set the bots' portal gun's keyvalues
Added set_gun(pgun, team) to set a bot's portal gun to match pgun
pgun_btn_deact() and pgun_btn_act() now update bots' portal guns
Added set_pgun_keys(gun) to set keyvalues on spawned portal guns in singleplayer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants