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 / Flashlight Script help!

Author
Message
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 27th Jan 2013 18:56
I'm working on fps creator 1.20 beta. I've tried every flashlight script but it seems that this is the only one that works for me:



i want to be able to pick up a flash light first and batteries in order to use flashlight. Over time the battery will decrease, and decreasing light as well. I''ve tried this:

http://forum.thegamecreators.com/?m=forum_view&t=179916&b=23

and it doesnt work. Can anyone help me?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Jan 2013 19:41
Hi irgeek, and welcome to the forums
What you have there (script) is for the built in flashlight for FPSC 1.20 & higher together with a HUD that displays on-screen so it feels like a real flashlight.See your "flashlightrange=500"
You'll want to decrease that range every couple seconds with an etimer. Like this


If you want a flashlight HUD with a battery life indicator
check out this post,maybe just what you want?
http://forum.thegamecreators.com/?m=forum_view&t=128879&b=23
But remember they use an "ambient" light source. You may want to read up alittle on scripting, it will halp alot.
best
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 29th Jan 2013 05:08
Thanks

While i'm here, any idea how to set a player's speed down to 20 when he or she hits a trigger zone?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 29th Jan 2013 06:22
Grab a copy of Ched80's Complete Script Syntax List here
http://forum.thegamecreators.com/?m=forum_view&t=180924&b=23
There are alot of conditions & actions to accomplish things.
Look for one action called "plrspeedmod=x" This modifies the speed of the player’s walk or run by a percentage.
best
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 30th Jan 2013 02:14
Thanks man! you've been a big help. Is there any way to make my enemy disappear without falling animation? I've tried "fadecorpse.fpi" but no luck. I'm using trigger to activatethe enemy for 3 seconds and then disappear.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Jan 2013 16:43
HI irgeek
When you say "disappear without falling animation" I take it you want the character not play any animations? Just a quick appear and disappear. Trigger your character,then put something like this into the Main script for your character.

Keep the fadecorpse.fpi in the Destroy script.It will just appear for 3sec's. But remember,it will play no animations.
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 31st Jan 2013 02:21
It seems to die with animation.

I have trigger set to plrinzoneactivateused.fpi
enemy set to fade.fpi which is this:



and destroyed as fadecorpse.fpi
;Artificial Intelligence Script

ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 31st Jan 2013 21:28
First try running your cleaner a couple times. Alot of times there are "left-overs" from a previous test run. Run your cleaner and test again.
Trigger your enemy with a zone. Your enemy's scripts should be
start-appear1.fpi/Main-your fade.fpi (or want ever you call it) /destroy-fadecorpse.fpi Your character should appear only for 3sec's. There are no animations to play in that script.
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 1st Feb 2013 01:26
I've tried that and nothing. I have taken screenshots. Is there something i'm doing wrong



ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 1st Feb 2013 06:51 Edited at: 1st Feb 2013 16:47
Hi irgeek
But it is spawning, right? And then disappears after 3secs? The only thing I would try different is changing "spawn after delay" to NO.
Just tested with your settings and all works great for me.Character spawns for 3sec's and disappears.I would double ck my .fpi's if I were you.
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 2nd Feb 2013 21:22
Still doesnt work, When it dies, animation comes in. I tried playing around with the settings and nothing. Could be the scrip thats not working?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Feb 2013 21:34
I would double check those fpi's again. It works perfect on my end.
The scripts call for no animations to play.
If anyone else comes along and has any idea as to why his character plays an animation with fadecorpse.fpi please let us know.
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 6th Feb 2013 02:06
Possible you can give me the fadecorpse.fpi script? i may have a different one but named the same.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 7th Feb 2013 19:16 Edited at: 7th Feb 2013 19:16
I did notice something different with your fadecorpse.fpi
You have two colon on the same line. Try this
But it still shouldn't play any animations with this?
One thing,if this doesn't work try changing your destroy script to
plain "disappear1" and test. (disappear2 is same as "fadecorpse")
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 9th Feb 2013 03:06
That seem to do the trick! Thanks but now i'm left with a shadow once it disappears Anyway to remove that?


ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 9th Feb 2013 18:28
Glad to hear it worked,but which one? Changing your "fadecorpse" or
using "disappear1"? As for the shadow left behind try changing castshadow=1 to castshadow=0 in the .fpe under visualinfo or if that doesnt work try hideshadow=1 in the appear script?
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 10th Feb 2013 03:13
awesome! Thanks so much! by any chance do you know how to set the doorkey script so that once a player finds the key and passes through the door, it will lock it's self again and never open.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 10th Feb 2013 16:19
Hi irgeek The Forum Search at the bottom is your friend. There are different ways of doing this. Also a quick look down the Scripts Forum near the bottom you will see a posting "Oneway Door script". Maybe what your looking for?
best
irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 10th Feb 2013 18:37
Yes, i've heard of the oneway door script. Problem is i'm using a lock door, not a remotedoor. Script wont work on a locked door. My idea was maybe drop or delete the key when you hit a trigger and also will close the door so that you wont be able to open that door again.

This will need two triggers, one will close and the other will delete the keys you have picked up.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 10th Feb 2013 20:08
try this:



irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 11th Feb 2013 23:09
Corno_1, that script doesn't work
I placed it on main for the door and it closes once i pass though but i can still open it by pressing enter.

I believe the only way to fix it is by destroying the key once i pass through the door so that i wont be able to open it again. But i don't know how.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 11th Feb 2013 23:20
sorry, but I also make mistakes. I must study this time, so I did not have time to test my scripts. So I will help as far I can
Try this:

This can be the solution, if not just say

Corno_1


irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 12th Feb 2013 04:38
Amazing! Thank you so much! Which part of the code closes the door? I want to be able to add a tigger
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 12th Feb 2013 10:46
this part:

for a triggerzone use the plrinzoneactivateused.fpi in the scriptbank folder. Pace the doorname into the ifused field of the triggerzone and use the following script for the door



Hope this is all you need

Corno_1


irgeek
11
Years of Service
User Offline
Joined: 26th Jan 2013
Location:
Posted: 18th Feb 2013 04:10
Awesome! It works, thanks! I'm working with way-points but AI keeps looping around my way-points even though i don't have it as a loop. I want the AI to Follow the path and stay at the end of the point and not move. Also how can i apply a 2 second delay before the door shuts close based off your script Corno_1?
borneo13
11
Years of Service
User Offline
Joined: 27th Mar 2013
Location:
Posted: 27th Mar 2013 17:06
Hello, i'm new here an i want to make a horror game, but i don't know how to install the flashlight script and how to use it in game. Can someone tell me how, atleast give me a short tutorial here? Thanks !

bornah

Login to post a reply

Server time is: 2024-11-23 16:50:53
Your offset time is: 2024-11-23 16:50:53