point_clientcommand doesn't work with buttons (and other stuff)

dabmasterars

L5: Dapper Member
Mar 20, 2023
230
37
point_clientcommand executes the command successfully only when ENTERING triggers. Teleporting inside a trigger doesn't do anything. Pressing a button doesn't do anything.

The command I'm using is "slot3" which is allowed to be executed via point_clientcommand.
 

Attachments

  • clientcommand.jpg
    clientcommand.jpg
    51.5 KB · Views: 47

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,259
999
If I'm not mistaken, func_button's OnDamaged output passes the weapon and not the player as !activator. I advise you to use OnPressed instead, and tick the 'Damage activates' spawnflag.
I'm not sure what's going on with the teleporting inside a trigger. I know if you spawn inside a trigger, it won't call OnStartTouch. You have to Enable it after the player(s) spawn inside it.
If you can prove a player has teleported to a destination, then perhaps it is enough to call the point_clientcommand in whatever logic has teleported them?
You could of course use VScript to call the entity. That way you may be able to apply any player you like as the activator, though I haven't checked. Mind you, it may be possible... nay, should be possible, to set a player's weapon slot using VScript.