The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Stuck doing a Jump-Scare script
Kixz0 Offline
Junior Member

Posts: 16
Threads: 3
Joined: Apr 2013
Reputation: 0
#1
Exclamation  Stuck doing a Jump-Scare script

Hello guys, I'm new to this forum. I made an account just 5 minutes ago just to ask for help. I've been searching around for about an hour now about what I do wrong but nothing seems to help me in this situation..

I want to create a jump-scare script in my custom story where a Body suddenly pops up in front of you and disappears again almost instant (in 0.7 seconds).

The body spawns when I enter the script area but it doesn't despawn.. = It activates but does not de-activate like I want it to, also the sound effect triggers everytime I walk into the script-area, and I only want it to trigger once.

Here's a screenshot of the situation:
Print Screen

The script is this:

void OnStart()
{
AddEntityCollideCallback("Player", "JumpScare1", "Jumpscare1", false, 1);
}


void Jumpscare1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "enemy_hallucination_disappear.ogg", "Player", 0, false);
SetEntityActive("Jumpscare_Corspe1", true);
AddTimer("", 0.7f, "JumpscareEntity_Gone");
}

void JumpscareEntity_Gone(string &in asTimer)
{
PlaySoundAtEntity("", "21_scream6.ogg", "Player", 0, false);
SetEntityActive("Jumpscare_Corpse1", false);
}

Hope someone can help me with this, I will hopefully release the Custom Story when it's done.. I've put a lot of time in it and I hate to get stuck hehe..

Sincerely!
04-07-2013, 08:36 PM
Find


Messages In This Thread
Stuck doing a Jump-Scare script - by Kixz0 - 04-07-2013, 08:36 PM
RE: Stuck doing a Jump-Scare script - by Kixz0 - 04-07-2013, 08:56 PM
RE: Stuck doing a Jump-Scare script - by Kixz0 - 04-07-2013, 09:30 PM



Users browsing this thread: 1 Guest(s)