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
Need some help with this script....
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#14
RE: Need some help with this script....

void OnStart()
{
AddEntityCollideCallback("Player","MonsterDoor","CollidePlayerWithMonsterDoor");
}

At this ^ you missed both bool abDeleteOnCollide & int alStates, making it correctly would be;

"AddEntityCollideCallback("Player","MonsterDoor","CollidePlayerWithMonsterDoor", true, 1);"

You've also missed float afFadeTime on the playsoundatentity, making it correctly would be;

"PlaySoundAtEntity("MonsterDoor", "react_scare", "Player", 0.0, false);"

Other than that there is nothing wrong with the script overall and it should work. In case it doesn't I'll just redo it all for you.

Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "MonsterDoor", "CollidePlayerWithMonsterDoor", true, 1);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}



void CollidePlayerWithMonsterDoor(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Scarydude", true);
FadeRadialBlurto(1.0f, 1.0f);
PlaySoundAtEntity("MonsterDoor", "react_scare", "Player", 0.0, false);
ShowEnemyPlayerPosition("Scarydude");
}


(This post was last modified: 06-19-2011, 02:59 PM by rojkish.)
06-19-2011, 02:16 PM
Find


Messages In This Thread
RE: Need some help with this script.... - by rojkish - 06-19-2011, 02:16 PM



Users browsing this thread: 2 Guest(s)