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
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#2
RE: Scripting

void monsterspawn1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster", true);
//Don't really need to add a sound to play since grunts make loud sounds when they spawn already
StartPlayerLookAt("monsterlook", 4, 2, "");
//A timer to stop the player looking
AddTimer("", 1.0, "PlayerStopLook");
}

void PlayerStopLook(string &in asTimer)
{
StopPlayerLookAt();
}

I think this is how it should look. Give it a try.

EDIT: Oh, you'll also need the collide callback in the OnStart() section.

void OnStart()
{
AddEntityCollideCallback("Player", "monsterspawn", "monsterspawn1", true, 1);
}
(This post was last modified: 01-04-2011, 06:06 PM by Equil.)
01-04-2011, 06:04 PM
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)