Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Good horror enemy script?

Author
Message
gamerguy72
11
Years of Service
User Offline
Joined: 12th Jan 2013
Location:
Posted: 12th Jan 2013 19:51
Hello, i'm a novice scripter and am trying to make a short horror game in fpsc.

Im trying to make a script in which an enemy will search for you when you get close and begin playing music. Once the enemy finds you he should loop a noise and chase you until he loses you again. The sound should stop looping after he loses you. He should also dissapear if he cant find you after 15 seconds.

Im not making a request, but I just wanna know how to go about doing this.
Any help would be useful, thanks.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 13th Jan 2013 13:19
This sounds like a request!

Ok, but maybe post a script which do the movement and then we can say, what to do!!

But I will help you without this, maybe this is enough:
Quote: "when you get close and begin playing music"

plrdistwithin=300:sound=your\file.wav

Quote: "Once the enemy finds you he should loop a noise and chase you until he loses you again. The sound should stop looping after he loses you"

aihastarget=1:loopsound=your\file.wav
aihastarget=0:stopsound
or
plrcanbeseen:loopsound=your\file.wav
plrcannotbeseen:stopsound

Quote: "He should also dissapear if he cant find you after 15 seconds."

etimergreater=15000:hide

This is not all. Of course you must throw this together to get a working script. You must of course add something.

Hope this helps

Corno_1


gamerguy72
11
Years of Service
User Offline
Joined: 12th Jan 2013
Location:
Posted: 13th Jan 2013 17:29
Thx for the help Corno. I have the movement down, i just needed help with the sound.
gamerguy72
11
Years of Service
User Offline
Joined: 12th Jan 2013
Location:
Posted: 13th Jan 2013 19:28 Edited at: 14th Jan 2013 02:54
Thx corno, that really helped! It works!
Kudos to you man. Just one problem. I cant get him to destroy after searching for long enough.

Here's my script

Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 14th Jan 2013 09:32 Edited at: 14th Jan 2013 09:34
maybe this helps


Corno_1


Login to post a reply

Server time is: 2024-11-27 09:21:50
Your offset time is: 2024-11-27 09:21:50