Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#3
RE: Scripting

Awesome, it worked. Of course I had to tweak the player look time and the velocity, as I had no real concept on their strength.

My next question is, say I want to use the an area, lets call it "area_trigger" and when the player collides with it and I want it to play a sound called "monster" on the player. Would the code look something like this?

void OnStart()
{
AddEntityCollideCallback("Player", "area_trigger", "playmonster1", true, 1);
}
void playmonster1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "monster", "Player", 2.0, false);
}

If this is right, the player would hit the trigger and the sound plays while fading after 2 seconds.
(This post was last modified: 01-05-2011, 01:25 AM by Russ Money.)
01-05-2011, 01:21 AM
Find


Messages In This Thread
Scripting - by Russ Money - 01-04-2011, 01:34 PM
RE: Scripting - by Equil - 01-04-2011, 06:04 PM
RE: Scripting - by Russ Money - 01-05-2011, 01:21 AM
RE: Scripting - by Equil - 01-05-2011, 02:21 AM
RE: Scripting - by Russ Money - 01-05-2011, 02:48 AM
RE: Scripting - by Equil - 01-05-2011, 03:17 AM



Users browsing this thread: 1 Guest(s)