Quote:
Originally Posted by GoldNux
Wow thanks! This is so much fun.
One question, can I emit sound from the entity?
|
Sure.
Upd:
example below should work in theory but is not working for me xd
Quote:
Originally Posted by GoldNux
I tried to look at it but I'm not sure how to find the entity index.
|
Entity index is the index of that info_target
E.g.:
PHP Code:
public plugin_precache()
{
precache_sound("weapons/sg_explode.wav");
}
if(placeSmoke)
{
new iEntity = create_entity("info_target");
if(iEntity)
{
entity_set_origin(iEntity, origin1);
emit_sound(iEntity , CHAN_WEAPON, "weapons/sg_explode.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
engfunc(EngFunc_PlaybackEvent, FEV_GLOBAL, iEntity, 26, 0.0 , origin1, {0.0, 0.0, 0.0}, 0.0, 0.0, 0, 1, 0, 0);
entity_set_origin(iEntity, origin2);
emit_sound(iEntity , CHAN_WEAPON, "weapons/sg_explode.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
engfunc(EngFunc_PlaybackEvent, FEV_GLOBAL, iEntity, 26, 0.0 , origin2, {0.0, 0.0, 0.0}, 0.0, 0.0, 0, 1, 0, 0);
remove_entity(iEntity);
}
}
__________________