Scripts / Mark's systems [wip]

Author
Message
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 24th Aug 2016 13:23
Thanks Belidos, I'll dissect this this weekend and hopefully have some bars.
Markchapman10 is my Skype let's have some dev talk.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Aug 2016 13:47
If you do figure it out let me know! I can do basic LUA, however with the more advanced stuff I can work it out theoretically , but I find the actual practical side hard. For example your inventory script is very close to one I've been planning for ages, but I could never quite work out how to do it, comparing your script to my attempts it looks like we think the same because mine's only a few lines different (plus I named the variables differently), but those few lines were what stopped it working and were stumping me lol

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.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 25th Aug 2016 12:58 Edited at: 26th Aug 2016 03:30
All scripting is is variable manipulation and displaying, so if you can work it out theoretically then you can dissect some scripts and get some commands somewhere to get the script to work. I always resort to smallgs scripts to see how he did things. if i cant figure his scripts out someone on the forums will be glad to help, i love this community, probably the best i've ever been part of. I'll have another look into those bars this weekend.


Well after a hard twelve hour shift I'm looking at what I have to do (rewrite the scripts i have and build the battle system and finish the menu system) and I'm excited to jump in but I think I'm going to wait until i get off tomorrow... I don't know.
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 26th Aug 2016 07:52
Thanks Belidos I'm gonna try that this weekend, works been hectic this month too so I haven't even had a chance to play with GG lately I need my fix lol This is an awesome community definitely the best one I've been to in many years. I do the same thing MChapman, I look at other people's scripts and kinda reverse engineer them to see how they achieved the end result. Hang in there man it's almost Friday trust me I know exactly how you feel I've been in zombie mode all week
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Aug 2016 05:01 Edited at: 27th Aug 2016 07:11


Well, I have no idea why but freeze player is screwing with me. the script works fine when I dont freeze the player, but when I do it wont let me do anything but circle around and shoot. Anyone else having problems when they uncomment out the freeze player lines....

How the menu works is when you hold the button the menu comes up ( with the AI unfroze to add challenge and quick thinking), and when you release the button the menu disappears. I'll be honest while I couldn't remember how to make it where if the player presses a button the menu shows and the player is froze, and then you press the button and the menu goes away and the player is unfroze, but I got the mouse to work when the button was being pressed and was like "hey ark has a quick menu this could work." and thats how I come up with this.

and now after a few hours of coding, im now going to turn in and get a fresh start tommorow..
Markchapman10 is my Skype let's have some dev talk.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Aug 2016 11:00
for a static menu you just need a toggle
like


for your issue perhaps try a toggle to check if the player is already unfrozen?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Aug 2016 22:24
as always to my rescue, I couldn't figuire out every time I used the freeze function it wasn't never right. I was always using wrong I guess, now to figure out how im going to do the buttons. I know I can draw the panels up but how can I check if the mouse is hovering over the button? If I can get that much then the rest will be easy.
Markchapman10 is my Skype let's have some dev talk.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Aug 2016 23:08
it's easy because both mouse and panel co-ords are in % so you just check the panel's box

i.e.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 28th Aug 2016 00:34 Edited at: 28th Aug 2016 15:34
Your a genious!

edit report: I have a bar of sorts working but I can't release it because its not decent. Its for stamina and its based on a timer my main complaint about it is its complicated to set up, and not being able to change the speed of the player makes stamina pointless. If there was a way of disabling run it would be sort of useful.

edit: Well, I had assumed that I would rework my scripts to work together but pretty much all i have come into was limitations. I was headed towards the battle system, as I said in the main post I want to eventually build two games with this engine A modern zombie apocalypse survival game ( because in this day and time who don't want one,) and A fantasy rpg. Ive been working on the zombie survival scripts first, I was working on leveling up, but you can't change the attacks of the guns, or how much damage they do which is a pretty big thing. So the battle system is on hold cause I have it as far as I can get it until I have a little bit more control. I added the scripts below however so you can see how a leveling system will act.

I'm still working on bars though.
Markchapman10 is my Skype let's have some dev talk.
science boy
15
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 3rd Sep 2016 10:27
so can you in this levelling scripting put a statement to weapons so if you are level 2 you cant use a level 3 weapon? or is there a way to make hitpoints go up or carrying items to advance etc.
an unquenchable thirst for knowledge of game creation!!!
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 3rd Sep 2016 16:56 Edited at: 4th Sep 2016 06:28
lol, yes, that is what I was working on however there is some limitations. You can do the weapons like that but I had to stop working on this cause of work and I met someone that makes sound and I've been working with him to make some music/ sound effects for my personal project. If you played around with the weapon functions in the global scripts you could easily do something like that. I also made it so that when you level up you could carry more medkits etc, its not hard but I wanted to get my menu up so the player could distribute stats and perks.


The scripts posted here are base scripts and not quite done however you can do what you want with them. If you want to talk here or pm I can help you set up the scripts to what you like, or to work how you want them to work. They are quite basic.
Markchapman10 is my Skype let's have some dev talk.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 19th Oct 2016 00:08
So I've been thinking of A system that would be easy to implement, I'll try to break this down. The system could be implemented into an rpg fantasy game or an apocolyptic game (as with all my scripts). The idea is to have npc's scattered all over your game world that you can have follow you, once they are following you you can take them to a location that you mark and have them stay there. the location is called the village, there will be different jobs for them to be assigned to. This part would be easiy in a fantasy game. the village can generate resources for you make you health and other items, in return you keep them a safe place to live and feed them with (if in an apocolyptic game) clean water. )
The idea seems simple enough to code, the biggest thing for me would be the interface, since I never actually succeeded with my previous interfaces.... Whats your thoughts or ideas on this?
Markchapman10 is my Skype let's have some dev talk.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 19th Oct 2016 06:20 Edited at: 19th Oct 2016 06:21
That is something g I actually desperately need for later in my wip, been trying to learn more about lua to work out how to do it, I'm still clueless though lol

(The following you to a set location part mainly I don't need the rest, but that does sound awesome too)

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.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 19th Oct 2016 13:40
if you just needed to set a location you could make a button press, and the button press would save the x,y, and z, then with those variabels you could do with them what you wanted.
Markchapman10 is my Skype let's have some dev talk.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 5th Jan 2017 02:44
bump to keep the thread going and a small update

I have been working on tables, and I have added some survival (hunger and thirst ) to the scripts.
still working on menus.
Markchapman10 is my Skype let's have some dev talk.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 7th Jan 2017 00:30 Edited at: 7th Jan 2017 00:33
Here is a quick implementation of hunger and thirst, and two scripts for the food and water items.
Also placed these at the bottom of the main post.

Main script


food item

water item
Markchapman10 is my Skype let's have some dev talk.
Unspokenbond
7
Years of Service
User Offline
Joined: 28th Nov 2016
Playing: GameGuru
Posted: 7th Jan 2017 03:44
Way cool!!! Thank you sir!!
Still learning LUA but 'attempting' to build my first game
PM
jsmith94
8
Years of Service
User Offline
Joined: 15th Apr 2016
Location:
Posted: 7th Jan 2017 11:09
Food / water scripts doesn't work for me for some reasons. I'm put food.lua into item (dynamic) and nothing happens. Why?
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 7th Jan 2017 16:17 Edited at: 7th Jan 2017 16:47
I found it, i forgot to change master table to g_thirst in the water script. I linked these scripts to my stats system. Im fixing it now. but all you have to do is on line 12 of give_water script change the master_table[1][2] to g_thirst.
Markchapman10 is my Skype let's have some dev talk.
Unspokenbond
7
Years of Service
User Offline
Joined: 28th Nov 2016
Playing: GameGuru
Posted: 7th Jan 2017 17:53
sweet! downloading ASAP when I'm back at my desktop! thank you this is very exciting stuff!
Still learning LUA but 'attempting' to build my first game
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 7th Jan 2017 18:24
while testing when I picked up either water or food, it went up alot, that could be fixed using another if, but for now it will work, maybe who ever uses it will finish it off until I get to it. I need to stop laying off the menus.....
Markchapman10 is my Skype let's have some dev talk.

Login to post a reply

Server time is: 2024-05-21 11:17:05
Your offset time is: 2024-05-21 11:17:05