Detecting player gesture/taunt without scripts
Quote from arek_91 on April 21, 2012, 10:23 amBy using logic_eventlistener I can detect when player taunts anywhere on my map and fire trigger in response. However, I want to check what kind of gesture he used and fire different triggers. (e.g. I want to make different response when player is laughing and when he is waving). Is it possible to do without using scripts?
By using logic_eventlistener I can detect when player taunts anywhere on my map and fire trigger in response. However, I want to check what kind of gesture he used and fire different triggers. (e.g. I want to make different response when player is laughing and when he is waving). Is it possible to do without using scripts?

Quote from ChickenMobile on April 22, 2012, 12:57 amTry looking at what Valve did so then GLaDOS spoke at the appropriate gestures when you learned them in the coop campaign.
-> I can probably do a quick search...
EDIT: You can have a look in Glados_coop.nut in scripts/vscripts/choreo and look at the function called named "PlayerTauntCamera (player,animation)".
This function is automatically called from the camera when the bots taunt to it.
- Code: Select all
function PlayerTauntCamera (player,animation){
if ( animation == "smallWave" ){
DoStuff()
}
}I know you said for no scripts, but this may be the only way to do it as the player and taunt used cannot be known by an event listener.
EDIT2: Check out this page https://developer.valvesoftware.com/wik ... nse_System
EDIT3: That still doesn't help... sorry.
modevents.res in resource
Try looking at what Valve did so then GLaDOS spoke at the appropriate gestures when you learned them in the coop campaign.
-> I can probably do a quick search...
EDIT: You can have a look in Glados_coop.nut in scripts/vscripts/choreo and look at the function called named "PlayerTauntCamera (player,animation)".
This function is automatically called from the camera when the bots taunt to it.
- Code: Select all
function PlayerTauntCamera (player,animation){
if ( animation == "smallWave" ){
DoStuff()
}
}
I know you said for no scripts, but this may be the only way to do it as the player and taunt used cannot be known by an event listener.
EDIT2: Check out this page https://developer.valvesoftware.com/wik ... nse_System
EDIT3: That still doesn't help... sorry.
modevents.res in resource
Quote from Spherix on September 6, 2013, 10:15 amSorry for bumping an old topic, but I've got an issue with scripts and such.
My main problem at first: A player activates things in an instance via a trigger_multiple in the actual world. The instance contains a vscript which counts if the player has been in that place for 3 seconds, and if it has, it executes functions that activate logic_relays and show an env_message.
I am now trying to let the game send a specific message to the player that activated it (we're talking multiplayer CS:GO here btw) with an env_hudhint. The hudhint however wont display because it doesn't know who the !activator was, since the original activator 'name' went lost when the vscript was executed.
Whilst searching for ways on how the vscript could learn who it's activator was, I noticed a logic_eventlistener and it said that could listen to events fired from code/script. If I couldn't get a vscript to learn who activated it, the hudhint will never show since those messages only show themselves to their activator.
My idea was to have the inital trigger_multiple also activate an eventlistener that would listen to a script function that normally displays the teammessage; and when that fucntion was activated, it could activate a hud message that it would kow since it was activated by a player in the world, and no instances or scripts got in the way. This does however, not work.
The documentation on what valid input is for the eventlistener to listen for is lacking, and I only found this topic. I hope you can clarify on what the eventlistener can listen to, or happen to know how to retrieve and pass an activator trough Vscript.
Thanks in advance.
Edit: I just found out that you have a EntFire and a DoEntFire, where EntFire seems to wipe the activator name; we've been using the EntFire name instead of DoEntFire, can anyone confirm that would work with a DoEntFire instead of EntFire? Cannot test it at this moment unfortunately.
Sorry for bumping an old topic, but I've got an issue with scripts and such.
My main problem at first: A player activates things in an instance via a trigger_multiple in the actual world. The instance contains a vscript which counts if the player has been in that place for 3 seconds, and if it has, it executes functions that activate logic_relays and show an env_message.
I am now trying to let the game send a specific message to the player that activated it (we're talking multiplayer CS:GO here btw) with an env_hudhint. The hudhint however wont display because it doesn't know who the !activator was, since the original activator 'name' went lost when the vscript was executed.
Whilst searching for ways on how the vscript could learn who it's activator was, I noticed a logic_eventlistener and it said that could listen to events fired from code/script. If I couldn't get a vscript to learn who activated it, the hudhint will never show since those messages only show themselves to their activator.
My idea was to have the inital trigger_multiple also activate an eventlistener that would listen to a script function that normally displays the teammessage; and when that fucntion was activated, it could activate a hud message that it would kow since it was activated by a player in the world, and no instances or scripts got in the way. This does however, not work.
The documentation on what valid input is for the eventlistener to listen for is lacking, and I only found this topic. I hope you can clarify on what the eventlistener can listen to, or happen to know how to retrieve and pass an activator trough Vscript.
Thanks in advance.
Edit: I just found out that you have a EntFire and a DoEntFire, where EntFire seems to wipe the activator name; we've been using the EntFire name instead of DoEntFire, can anyone confirm that would work with a DoEntFire instead of EntFire? Cannot test it at this moment unfortunately.

Quote from ChickenMobile on September 8, 2013, 7:29 pmSpherix, I saw your reply in another thread and I believe that there may be an easier way to your problem.
If you just want to know if a certain player has been in an area for 3 seconds then its probably better to use a relay, a trigger and a logic_auto that are spawned by a point_template.
Main Trigger:
OnStartTouch -> point_template -> ForceSpawn
OnEndTouch -> nameofspawnedentities -> KillSpawned trigger from template:
OnStartTouch -> relay -> trigger -> 3.0
OnEndTouch -> relay -> disableRelay:
Ontrigger -> dostuffI was going to fiddle around with this to get it working however this is a Portal forum and not CS:GO, therefore I don't actually own the game - plus I need to go to school.
Spherix, I saw your reply in another thread and I believe that there may be an easier way to your problem.
If you just want to know if a certain player has been in an area for 3 seconds then its probably better to use a relay, a trigger and a logic_auto that are spawned by a point_template.
Main Trigger:
OnStartTouch -> point_template -> ForceSpawn
OnEndTouch -> nameofspawnedentities -> Kill
Spawned trigger from template:
OnStartTouch -> relay -> trigger -> 3.0
OnEndTouch -> relay -> disable
Relay:
Ontrigger -> dostuff
I was going to fiddle around with this to get it working however this is a Portal forum and not CS:GO, therefore I don't actually own the game - plus I need to go to school.