Scripts / Another flashlight thread...

Author
Message
MStockton
9
Years of Service
User Offline
Joined: 28th Apr 2015
Location: Texas & Finland
Posted: 16th Jul 2016 16:18
Hello, folks. I've searched through my collection of scripts and the threads here but am not finding what I need. There seem to be parts of what I need spread out in several scripts... And scripting is my enemy. I don't know how to begin combining the scripts to get what I need. My eyes blur at the sight of the code. So I am finally asking for help, and I will probably have to ask for more soon. Here are the details:

1. What I need right now is a flashlight that must be picked up.
2. It also needs to be able to flicker when used.
3. I want the light to drain until it reaches zero and then shuts off.
4. The light must regenerate its own power. Showing the light's remaining power on-screen is helpful but not required.
5. I do not want anything to do with batteries as they kill the whole point of this light.

If anyone can help with this or point me to an existing set of scripts that do the trick, I'll be forever in your debt.

It's possible in the near future that I will need to pay someone to help me finish out some of the major details with scripting. This light is probably the simplest place to begin. Everything I'm working on is going great with 99% original models, textures, and audio... It's always scripts slowing me down. If you are someone available to do a little work on a very low budget but good quality project, feel free to send me a note with any details so I know who to contact when I reach that point!
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 16th Jul 2016 19:23
https://forum.game-guru.com/thread/215529#msg2549773

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
MStockton
9
Years of Service
User Offline
Joined: 28th Apr 2015
Location: Texas & Finland
Posted: 17th Jul 2016 01:01
Thanks. I've seen and used some of that already and I'm still trying to piece it all together. I'll keep digging for a while tomorrow. I'm going crazy at 3am now. Time to work on something a little more cheery and clear the brain.
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Jul 2016 17:26 Edited at: 17th Jul 2016 17:27
To get it to do what you want, don't use the battery script, and in flashlight3.lua set it to have a battery at the start (clearly noted in the script) and change the line that allows it to regen (also clearly labelled in the script), it's as easy as adding two maybe three numbers to the script, which (because it's a script based on a smallg script) is fully labled with notes on what does what.

(also to hide the battery icon just change the battery icon location to x=200 and y=200)

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
MStockton
9
Years of Service
User Offline
Joined: 28th Apr 2015
Location: Texas & Finland
Posted: 18th Jul 2016 14:04
Thanks again, Belidos. I got it about half way to what I wanted and ran into another speed bump. I'll get it eventually. I'll look into what you just suggested first of all. This is a problem I have with everything that requires coding. My brain and eyes just don't like it, no matter how simple it may seem.

Maybe I'm too old or started looking at code too late. I managed to learn a lot of HTML back in the 90s so it's always upsetting to me when I can't seem to pick up new things that are similar at first glance. Audio/Visual and overall design are my strong points. Coding usually requires me to study a single line to the point of frustration and I end up paying someone to help me out of a jam. Free time is also highly limited with a wife and several kids so I do most of my best work in the middle of night when I should be sleeping. I suppose that's what design teams are for but I'm pretty much a one man army.

So, tell me it gets easier!
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 18th Jul 2016 16:54
I'm the same, my programming knowledge starts and ends with Basic (and I mean basic, basic, back from the bbc micro days), html, xml, and css.

It does get easier, and to be honest if you know he simplest forms of Basic then it shouldn't be hat hard for you, it's very similar as in if and then and else statements enclosed in loops.

So yeah it does get a lot easier the more you dive into it.

I'm still learning myself, to be honest, my level is really only at the point where I can edit other peoples scripts, but if I have to write my own I get confused, but i'm sure I will get there eventually.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
MStockton
9
Years of Service
User Offline
Joined: 28th Apr 2015
Location: Texas & Finland
Posted: 18th Jul 2016 18:51
Well, I have just successfully finished another script I was working on, and that feels great. It was based off of several examples and I must have guessed all the parts and changes into the right order because it finally started working. I finally have flowing lava that actually causes damage as soon as you get close enough. As soon as I attach it to everything I need it on, I'm gonna hit that flashlight again.

I get as far as I can without the coding and then I hit these slow spots and it really puts a wrinkle in getting things completed. I record instruments and sounds and then build VST instruments and effects that often use Ruby. I also work with GameMaker Studio which has its own language. Then here with LUA in GG. I still do websites from time to time but that's a bit simpler than it used to be, thanks to Wordpress and Joomla, etc. My wife has a different native language than I do, as well, so my whole life is often drowning in code and I'm bad at most of it!

I'll be sure and let you know how the flashlight goes. Hopefully I can pull it off without any major assistance. Thanks again.
I'll add an avatar and a real signature someday. I think...
PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 4th Aug 2016 01:16
Scripting for me is the funnest part, I like the challenge of being dead in the water not knowing what to do.... when that does happen I look at my script and read every line until I fix it....( or post a thread here for help). This community is by far the best on any software or game ive used. Someone here can help you if you explain it good enough.
Markchapman10 is my Skype let's have some dev talk.

Login to post a reply

Server time is: 2024-05-04 02:11:28
Your offset time is: 2024-05-04 02:11:28