(09-17-2011, 12:26 PM)AmnesiaIsScary :S Wrote: I have 2 problems :
1. I Don't know how to use the prop impulse exactly ... This is my entity name :
chair_nice02_1
Can you maybe show me the exact command ?
2. I Don't know how to use the PlaySoundAtEntity Command ... Do I need to make an "AddPlayerCallBack" and then put it under it (After the } ) ?
Or should I just put and and insert the commands ?
Like this :
////////////////////////////
// Run first time starting map
void OnStart()
{
void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
}
and what to put in the "string& asSoundName" ?
When you have your scripts, you only need to put
void in front of the parent functions. In this case, if you want a sound to play right when the map starts, you only need
void OnStart()
{
PlaySoundAtEntity("[what goes here is what the internal name of the sound will be called, can leave blank, but leave the quotation marks]", "[sound file + .snt extension.]", "[entity to play at]", [time it takes the sound to fade], [still not sure what this does, i personally leave at false]);
}
Propimpulse works rather simply. It's basically the same as propforce, as far as I can tell. If it's different, someone is free to correct me. Anyhow,
AddPropImpulse("[Prop being pushed]", [Amount Along the X axis], [Amount along the Y axis], [Amount along the Z axis], "world");
Hope this clears things up for you.