Scripts / [SOLVED] Flashlight Script not working! Help Please!

Author
Message
islandcam
6
Years of Service
User Offline
Joined: 19th Sep 2018
Location:
Posted: 20th Sep 2018 11:20
So I have always admired the FPS Creator classic and always had fun making games and had my errors here and there but I can't seem to figure out whats going on here. So I found this code to make your flashlight not work till you've obtained one and loaded batteries into it but right when I pick up the flashlight I get a runtime error code. I am no pro with LUA and I am still getting the basics but I did everything that was described in the instructions. Is it because the battery model I purchased from the GG store has no option to set it as dynamic from static? It only says Occluder & Occludee.

Found code source from: https://forum.game-guru.com/thread/215529#postHolder

Please help me! This is my first post thanks to anyone that can give me some advice! Sorry im noob lol

The author of this post has marked a post as an answer.

Go to answer
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 20th Sep 2018 12:22
When you place your model in the map you can press y to toggle it from dynamic to static. Red for static and green for dynamic.

You could also open the fpe file and add defaultstatic=0

That will make it dynamic when you set it in the map without togglING the y key.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 20th Sep 2018 13:47 Edited at: 20th Sep 2018 13:50
I've noticed this issue a lot lately, for some reason some models simply don't have the option to switch them from dynamic to static, i've found if you add the defaultstatic line to the fpe then you get the option back, so i've started making all my new models with that line in the fpe.

I've actually found that with a couple of the drop down options, if you don't have a "default" setting listed in the fpe, the drop down menu doesn't appear on the properties panel.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
islandcam
6
Years of Service
User Offline
Joined: 19th Sep 2018
Location:
Posted: 21st Sep 2018 07:30
So I did what you said but it still says the same and crashes I don't know what I am doing wrong?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st Sep 2018 15:19
What is the error? Please provide the code the runtime error provides if there is one.
Does the flashlight and the map work fine until you try add the above script?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
islandcam
6
Years of Service
User Offline
Joined: 19th Sep 2018
Location:
Posted: 22nd Sep 2018 11:47
This is what it shows but yes it runs perfect before I tried adding script.

Attachments

Login to view attachments
PM
islandcam
6
Years of Service
User Offline
Joined: 19th Sep 2018
Location:
Posted: 22nd Sep 2018 11:49
Runtime Error 501: Image Number 9600 0
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Sep 2018 17:15
This post has been marked by the post author as the answer.
ok so i assume you are using flashlight3.lua, looks like the images were missed off from the download provided at that link
you need to make sure these 2 files exist
Quote: ""scriptbank\\images\\flashlight\\fl_icon.png""

&
Quote: ""scriptbank\\images\\flashlight\\flb_icon.png""

if they don't you can just make any basic image for testing as long as you name/place them correctly or download them from my original post
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Sep 2018 17:25
Yeah flashligh3 was the edits i made to combine the pickup and drain scripts you made, it was never meant to be used alone but eith yours.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
islandcam
6
Years of Service
User Offline
Joined: 19th Sep 2018
Location:
Posted: 29th Sep 2018 15:11
I got it to work perfectly thank you so much for your help! I am sorry if I was a pain in the ass I am new to this but love the creator. This community is awesome thanks for all your great uploads and help both of you!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 29th Sep 2018 15:48
Quote: "Yeah flashligh3 was the edits i made to combine the pickup and drain scripts you made, it was never meant to be used alone but eith yours."

no problem
Quote: "I got it to work perfectly thank you so much for your help! I am sorry if I was a pain in the ass I am new to this but love the creator. This community is awesome thanks for all your great uploads and help both of you!"

welcome and glad it's working now
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-12-22 20:57:45
Your offset time is: 2024-12-22 20:57:45