I can't get ps.origin from the client entity as this field is unknown to LUA.
I can't spawn the tempentity with SVF_SINGLECLIENT or EV_GLOBAL_CLIENT_SOUND as event, and as there seems to be no documentation related to the available events I'm stuck on this.
And I can't set s.eventParm on the tempentity as this fiel is also unknown to LUA.
Just for comparison, this is how it works in game code:
Code: Select all
snd = G_SoundIndex("somesound.wav");
tempent = G_TempEntity( ent->client->ps.origin, EV_GLOBAL_CLIENT_SOUND );
tempent->s.teamNum = (ent->client - level.clients);
tempent->s.eventParm = snd;
Code: Select all
soundindex = et.G_SoundIndex( "somesound.wav" )
origin = et.gentity_get ( clientNum, "ps.origin" )
tempent = et.G_TempEntity( origin, SVF_SINGLECLIENT)
et.gentity_set( tempent, "s.teamNum", clientNum )
et.gentity_set( tempent, "s.eventParm", soundindex )