NomNomNomNation Posted February 21, 2015 Share Posted February 21, 2015 Hey guys! I was wondering how I mess with the Flashlight variable? Making the flashlight break and turn off by itself, completely disabling it, etc. If there is anyway, then please let me know as I need to be able to edit how the flashlight works for a game that I'm working on. Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
beo6 Posted February 21, 2015 Share Posted February 21, 2015 that is very simple. If you use the default FPS Player script add an additional variable at the start. For example: Script.flashLightWorking = true then search where the flashlight gets enabled or disabled (Key F) There add a check for that variable when pressing the key. Now if you want the flashlight to stop working just set that variable. For example if you use the flowgraph you can add a function for that: function Script:BreakFlashlight()--in self.flashLightWorking = false self.flashlight:Hide() end Quote Link to comment Share on other sites More sharing options...
lxFirebal69xl Posted February 21, 2015 Share Posted February 21, 2015 Make sure you have the player enter a trigger and connect that trigger in the flowgraph otherwise it won't work. Quote Link to comment Share on other sites More sharing options...
beo6 Posted February 22, 2015 Share Posted February 22, 2015 well. that depends in how he wants to have the flashlight break. If it is timer based or anything a trigger makes not much sence. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.