Scripts / Mark's systems [wip]

Author
Message
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 5th Aug 2016 04:07 Edited at: 7th Jan 2017 16:47
Sorry for the long post, the spoilers wont work for me for some reason.
This is a collection of my creations, I'm putting these up as templates for you to modify to your own needs.



The leveling



This is the level up script, you can read the comments to modify it.


Add this to any of the enemies exit functions and change the g_monster_xp_list variable to what ever enemy you want in the main script.


3. basic inventory system - This is considered done and you can get them from below. All of my scripts are as is and are free for any type of project. I plan to get a video of these. If anyone would like to use them but is having trouble with them ask here and ill help you out. The icons are place holders I made so you dont need them. You will have to change the path in the main_inv script. Added the icons I didn't upload them before completeing the last edit.

The scripts for the inventory
I have finished the inventory scripts ( there is eight) there is A item script for the items ( medkits, money, flashlight, batteries) A loot script for searching for money in furniture, There is a medkit merchant to sell you a set number of medkits.

Screenshots of the inventory





main inventory script - this is what actually handles the inventory, its functions, and the sprites.


the medkit objects, put this in the medkit entity, or what ever entity your using to give your player health.


This is the money script, put this script into what ever entity your money is and he will be given a random amount.


This is the flashligth script. you put this into your flashlight entity.


this is the flashlight battery script, I dont have any flashlight entities so i put this on calculators and other things with batteries and made the player think he was stealing batteries out of those objects, gave me a sense of survival and resourcefulness.


this script makes entities loot able for money.


this is the battery controller script, this will need to be in a dynamic object and always on.


4. NPC talking system - My basic npc talking system is now done, granted this is a WIP, all I got at the moment is Two scripts. The first script is the database, the scripts with the table that will hold the dialog. I wanted this in its own script because it could get quite long. The second script goes in the npc entity. Pretty much all it does is get the entity name and prompt the dialog from the message script. THIS HAS NO AI, and just prompts text depending on what your entities name is. for making npc dialog easier to manage.

this script will house all the dialog for all the characters, all you have to do is name the character entity and put the name of the entity and what you want he/she to say.


unless you want the distance changed this script don't need changed you can put this script in the npc and it will work.


Some screenshots of the npc scripts but there isn't much to see.




Here is a quick implementation of hunger and thirst, and two scripts for the food and water items.
Hunger and thirst will gradually go down in random increments, and when you eat and drink they will go up in random increments.

Main survival script


food item

water item
Markchapman10 is my Skype let's have some dev talk.

Attachments

Login to view attachments
MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 7th Aug 2016 02:43
sweet
AMD Phenom x4 9850 2.58 Ghz , 6 gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 8th Aug 2016 20:01
Works perfect with Smallg's shop script, the only change I had to make was set local money to global (g_money) on the shop script and bam. I know it's a wip but works perfect over here. Thanks a bunch!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 9th Aug 2016 02:39
Thank you, its basic and i do plan on improving all the systems as I learn lua and the engine. Also any ideas I would be willing to try them out.
Markchapman10 is my Skype let's have some dev talk.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 9th Aug 2016 07:39
Looks and works great.

I'm actually writing my own at the moment, with inspiration from your script and smallg's inventory script, bth of these have given me so many ideas.

I have a question though, your variables for items, such as g_medkit etc. You've made them globals which is great, they should be picked up by the save/load feature, and I see that at the beginning of the script you set them to 0, which makes sense. But how does setting them to 0 at the beginning of the script effect save/load? Ie will the numbers be forced back to 0, or would the save/load override those settings?

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: 9th Aug 2016 11:31 Edited at: 9th Aug 2016 11:34
honestly I couldnt tell you, I haven't messed around with save and load, I made them global so I could access them from other scripts. if I add a value to them the value is saved on testing .
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 13th Aug 2016 00:09
Love what you did with the NPC script the way the text prompts is perfect. But I was just wondering why you made the npc stand still? If you add this after playerdist: LookAtPlayer(e) and CharacterControlUnarmed(e) under init it should cause the npc to look at player. I'm still new to LUA so I could be wrong but nice work!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 13th Aug 2016 01:02 Edited at: 13th Aug 2016 04:11
I was just building the npc dialog bits, i wasn't building AI lol, once I get all of my systems listed in the op done I'll look into making them better but I just wanted the basis of the scripts done. RotateToPlayer(e) above the dialog displays so the entity looks at the player. pretty much for me all this part of the npc dialog will be for is npcs that will be sitting in town like quest givers and the like. It makes it easy cause now i can make the dialog and then just name the entity and boom dialog is assigned.
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 13th Aug 2016 08:17
Oh yeah that's make sense never thought about them sitting down, I'm still learning so I appreciate you getting back to me. And yeah you're right since they are sitting down I would use rotate to instead of look at. I'm going for a similar setup like your's where most of the npcs contain dialog, so that's why I'm really liking how you housed it all on one script. Using entity names makes everything so much easier on the eyes too, especially when I start adding all the npcs and dialogue. This is coming along sweet can't wait to see the final version
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 13th Aug 2016 13:42
I was thinking about adding a panel around the text but that wont be for a while. I'm glad you could use it! If you have any ideas for these scripts then ill take any ideas.
Markchapman10 is my Skype let's have some dev talk.
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 18th Aug 2016 06:13 Edited at: 18th Aug 2016 06:17
I wasn't going to post anything until I get it done but I'm having trouble. For some reason the script will only show leveling up to level 2, it wont level up to level 3. This is the whole script


This is the if statements that I'm currently using

I tried to use

and neither one of them works, it will level me up to level 2, but it wont let the next if statement run for some reason? the individual level_one, level_two, etc variables are another way I have tried but ive worked on this for three days now and figured maybe some new eyes my be seeing my mistake. lol, this is the struggle I like, but the struggle normally isn't this strong .

if your having a hard time understanding the script ill try to explain it better, just say so.

edit: lol. I hate releasing the whole thing before its propperly working but im in great need. this script is by no means ready but you can level up to level two if you want to try it out. put this in any characters ai exit function to gain xp and you can modify the xp rate of the enemy in the level script by reading the comments.

Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 18th Aug 2016 08:44
Man you keep making everything I need, once again thanks a bunch!

I got it to work by changing the g_exp(2) value to 600 instead of 500, as for some reason it's not working with a range or greater than. When I noticed I could never hit exactly 500 exp then the light when on lol

PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 18th Aug 2016 08:52
screenshot

Attachments

Login to view attachments
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 18th Aug 2016 12:46 Edited at: 18th Aug 2016 13:03
ok i got it to work, by changing the if statements and now you can level up to level 4! lol. thanks for the help. here is the if i used.




and now when I get home from work I can make it look pretty maybe add an xp bar and fancy hud for the level.
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 18th Aug 2016 19:03
Sweet this is coming along real nice, can't wait to see those huds you come up with. For now I just slapped a panel behind the text, moved it to the upper left corner, and gave it some color. I gotta clock in this afternoon too, but when I get back home later tonight I'm gonna check it out. I had a question also about gun accuracy, if that could be implemented into this script and how?

Oh and I noticed for headshots it doesn't add exp, so I added the code below into the all my ai scripts. I really like the way you set it all up since it makes it easy to change the "monster type", with one number change. Like for my boss ai I'm using 4 which gives 5x exp of normal monsters:



Too bad the player's total health is hard coded, and is controlled by the player start marker otherwise with just SetPlayerHealth it could go up as you level. It adds the health but won't regenerate beyond the initial starting health as you can see in the screenshot.

Attachments

Login to view attachments
PM
MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 19th Aug 2016 00:08 Edited at: 19th Aug 2016 00:13
Wow, coming along. Where do the icons go?
AMD Phenom x4 9850 2.58 Ghz , 6 gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 19th Aug 2016 01:36 Edited at: 19th Aug 2016 03:39
@mk83 - the icons go in your script/image folder

The script has some comments, in skills you can add another skill, make it what you want, but I think accuracy is hard coded(may not be im not sure.) but if you had a way of making accuracy a variable you could make the variable a new skill like

set it to a low level and then as the player gets better maybe make it better, thats all i can say about it though since i haven't played around with ai or any of the weapons.

I try to make all of my scripts as basic as possible and since i know what its like not being able to code ( from the rpg maker ruby scene) I keep the non scripters in my thoughts as i make the scripts.

if you watch the broadcasts there is one about health types, I've watched it ten or more times and I' going to watch it a few more as i play with the game_loop script for the battle system.

edit: learning gimp isn't as fun as learning a new programming language, or lua.....
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 19th Aug 2016 07:35
Yeah I think you're right it's hard coded for the gun accuracy, but yeah I saw your tables and really like how it's all setup. I was gonna change strength to gun accuracy to make it feel like the player is getting better as they level up. All the definitions for the weapons are in the gunspec.txt, but I can't get them to change through lua scripts. Of course I can change them manually but that's not what I'm trying to achieve lol

I've never played around with Ruby how is that? I'm taking a long break from unity right now lol GG is fun but I get the feeling it's gonna be stuck in beta for years. I'm definitely gonna take a look at those videos, wow I didn't even think about gameloop I'm gonna give that a try too. I'm guessing it'll be something like g_gameloop_PlayerHealth or StartHealth

LOL Yeah learning Gimp especially if you're used to Photoshop is not fun. Then again I suck at graphic design, but I still remember messing with it back when I installed my first Linux distro way way back in the days.



PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 19th Aug 2016 07:42
Oh and I was gonna test also to see if the update function works with GG, and if it does it should fix the money resetting to 0 whenever you change maps. Something like return g_money:GetValue() sounds right to me but I could be wrong.
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 19th Aug 2016 11:41 Edited at: 19th Aug 2016 12:16
is there A way of prompting text in the Center of the screen? I want the level up message to be bigger and show in he center of the screen. I released the script but I don't have the bar set up yet, I put it by the hp hud for now, HOPEFULLY this weekend I'll get around to building my hud so i could do away with the default hud...

since the variables should be global they should save or i thought they would, I never thought about it not saving. the battle system will have to have the saving so I'll look into that as I get further along.
Markchapman10 is my Skype let's have some dev talk.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 19th Aug 2016 12:14
Prompt text is either at the bottom of the screen, or if you use the PromptLocal command at the origin point of an object. You could use the normal text command with its location as 50,50 instead f you want it in the middle of the screen.

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 Aug 2016 17:22
how do i get text to stop displaying though?
Markchapman10 is my Skype let's have some dev talk.
sokiu93
8
Years of Service
User Offline
Joined: 17th Aug 2016
Location:
Posted: 19th Aug 2016 17:26
Oh and I was gonna test also to see if the update function works with GG
[B]You can buy[URL=http://"http://4dsecret.com/"]Toto 4D[/URL] tickets online and check 
[URL=http://"http://4dsecret.com/past-results/"]magnum 4d past result[/URL]
online at [URL=http://"http://4dsecret.com/malaysia-4d-results"]4d malaysia[/URL]
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Aug 2016 20:55
I've not seen yours scripts yet, anyway maybe you need to add some flag to the code.

Just as example:



Or



Or
Try to place prompt out of the loop if possible, (is your best bet, I though).

Or
I've never had tried it, just mind about right now, but...



perhaps might help or does not, who knows.

hth

3com





Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 20th Aug 2016 03:08
The update function works, but saving it to the battle system would be much easier to work with also less buggy. Does anyone know if the File I/O system works with GG? I'm guessing it does since saving is possible, but that's what I would use to write those global values (money/batteries/etc) to it's own file that it can also read from. That way each player can have their own values saved separately like a live database file. I don't know if I'm allowed to post links yet but check it out here: http://www.tutorialspoint.com/lua/lua_file_io.htm

"how do i get text to stop displaying though?"

I would think PromptDuration(str,v) but the above should work also
PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 20th Aug 2016 03:29
Btw I also watched those videos, and learned how to work around that starting health issue plus add armor

Attachments

Login to view attachments
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 20th Aug 2016 06:34 Edited at: 20th Aug 2016 06:36
Wow pepesilvia! that hud looks amazing! I have yet to decide on the hud im going to use, I was at work and a concert/state fair today and im going to start working on this tommorow. Also you should draw the blank sprite at like 300 so its not showing.

all the prompt (Prompt and PromptDuration) both display at the same place, and once you draw text to the screen there is no way of deleting it with a "flag" variable is my problem. or if there is a way of turning text display off then that would work.... I will draw the text off the screen but that seems like it will bog the system down a bit. any other solutions are greatly welcome thanks for all the help guys!
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 20th Aug 2016 16:57
Thanks and yeah I thought I could hide it, but hideimage only works with loadimages not loadimage, and of course sprites don't work with loadimages lol So I took your advice and set it off screen, but I'm starting to understand lua a little better. Sounds like fun especially if you're getting paid to be there also, btw which timezone you in? I'm on PST

I added to your character_stats script so that when the player levels up, their health and armor values go up by 5 as well. I made a pentagon shape and flipped it for the weapon hud also. I used the default GG weapon/ammo icons for now as placeholders but hopefully someone can make some custom ones.

Attachments

Login to view attachments
PM
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 20th Aug 2016 18:04
Made some quick improvements: Ammo shows red now when less than 3 and changed the level color

Attachments

Login to view attachments
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 20th Aug 2016 18:06 Edited at: 20th Aug 2016 18:18
I'm in utc, wv usa. your hud is nice, if you could extend it just a little you could add the xp on the bottom, this is a bad picture but this is what i mean, and you could comment out the default panel.



hopefully I can get me some kind of hud built....
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 20th Aug 2016 18:21
Good idea I'm gonna work on that next, and also I'm gonna experiment with a health bar script I found on here to read exp value instead. American Dad town lol I'm in AZ so please excuse my ignorance, originally from CA. I'm off to work but I'll be back on tonight to add that
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 20th Aug 2016 18:30
What i would like to do is make a function, that will draw/display A red bar locally on the entitys when you are close to them. I wish there was like a option with the localprompt that you could put 0 or 1 like 1 = show above the entity ( above his head or 0 below the entity). that would be amazing.......
Markchapman10 is my Skype let's have some dev talk.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Aug 2016 18:40 Edited at: 20th Aug 2016 19:11
https://forum.game-guru.com/thread/215803

I put one up a while back but I'm waiting for Lee to allow scaling in x,y,,z independently to make it work properly. He may have fixed it in the latest beta, I'll check that later.

(edited to add link)
Been there, done that, got all the T-Shirts!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 20th Aug 2016 19:41 Edited at: 20th Aug 2016 21:49
Thanks for that AmenMoses!

how do you draw/display text in front of sprites? ive tried a 0 of depth and 100 depth, i cant get anything to work.
Markchapman10 is my Skype let's have some dev talk.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Aug 2016 23:33
I've not played with text yet, been too busy with more fun stuff.

Found this in global.lua:

PasteSprite ( mySprite ) -- pastes the sprite at its current location (good for pasting sprite BEHIND text)

Dunno if that helps.
Been there, done that, got all the T-Shirts!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 20th Aug 2016 23:58 Edited at: 21st Aug 2016 00:19
lol, what would an advanced coder like yourself consider fun? Thanks for that I scroll through and search for things that I think are relevant in the global lua but usually to no prevail. I use the steam lua guide ALOT thouggh.. I keep the search up in it, I think the advanced coders need to get together and make a new lua guide with tips and tricks in it. Tables needs to be added to the steam guide as well... I'll try that thanks AmenMoses.


edit results:
PasteSpritePosition <- this worked but I wasnt sure how to just paste the sprite in without the position, but I got it!
I made the red blood splat in Gimp.
Markchapman10 is my Skype let's have some dev talk.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Aug 2016 00:27
Animal behaviour AI scripts mostly, can't find any decent animal models to use them with though.

Having flocks of sheep wandering around doing sheep-like things or packs of wolves doing wolf-like things can really spruce up a game.

My day job involves writing software that stops aircraft becoming craters so playing around with GG is my way of relaxing.

Been there, done that, got all the T-Shirts!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 21st Aug 2016 00:32
I hear you, I Want to get into AI but I don't think I'm ready for that so that is why I created this list. By the time I get done with this list I should be able to do some kind of AI. I love programming. I honestly like (just like not love) modeling but it seems like programming is a bit more fluid for me and I cant do any art so all my models are blender gray..........
Markchapman10 is my Skype let's have some dev talk.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Aug 2016 01:14
It's a cool list and it's good to see someone else who loves the programming side, it is impossible to create a game without it no matter how good the game engine is.

I like to push the envelope and am having fun pushing GG to see what it is capable of. AI wise it is certainly deficient and I have tried to improve the existing AI scripts but without some pretty major improvements in the engine itself the amount that can be done in Lua is restricted. I am in touch with Lee regularly so hopefully we can do something about that when the EBE is done and dusted.

AI is one aspect of programming that is still more of an art than a science, I like to aim for realism but it is quite difficult to achieve. My sheep script for example has a lot of randomness built in, one 'ram' may be more aggressive than another, one may be more of an explorer than another (my 'sheep' flock by following their 'ram' leaders and my 'lambs' follow their mothers but each does so with a random element built in so the overall effect looks very natural. When approached by the player each individual sheep will react differently and that reaction is then reacted to by the entire flock but again each sheep has a random factor introduced in how quickly they will react and in which direction that reaction occurs (and how quickly they move etc) .

As I said, more fun than printing text.
Been there, done that, got all the T-Shirts!
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 21st Aug 2016 01:27 Edited at: 21st Aug 2016 07:38
lol, that sounds quite fun. The wait times in between testing though while waiting to load is killin me. how can I take sprites from the default hud and use them in my hud? That is elaberate yet I cant find the sprites/images anywhere.

I broke game guru and im not sure how, this script is the only thing running in GG... Its to late for this lol. This is the start of my menu script.

Markchapman10 is my Skype let's have some dev talk.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st Aug 2016 09:22
You can't put a prompt call outside of the function.
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: 21st Aug 2016 17:15 Edited at: 21st Aug 2016 17:28
oh, I see it, I assumed that if I put it outside of the function it would show up since the script was acting like the name was messed up but the name wasn't, it wasn't doing anything and i'm not sure why.
Markchapman10 is my Skype let's have some dev talk.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st Aug 2016 23:33
i see so that was just a test to try find the issue?
well from a quick look it seems ok but might be these
local sprite_mouse_locx = g_MouseX
local sprite_mouse_locy = g_MouseY
maybe it doesnt know what g_MouseX and g_MouseY are yet.
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: 22nd Aug 2016 01:20 Edited at: 22nd Aug 2016 03:39
I pulled them from the global. lua script. I don't know, ill rewrite it again. >_< Ive tried a few methods, the screenshot also happened on my first revision when it froze the player in place for the menu.I'm not sure whats going on. I will probably have to do alot of editing to the scripts any ways with the way im going to work perks, leveling and other bits that i have partially put in for testing.
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 22nd Aug 2016 13:14
Here's the updated hud with the extension for exp, only problem is the text will probably need to be smaller so when you hit 1k it doesn't start running off the sprite. That's why I want to use some sort of bar that fills up and resets as you level, or some icon sprites that are dim and light up as exp increases. I really like that blood splat you made is that gonna be released with all the other scripts in here?

Attachments

Login to view attachments
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 23rd Aug 2016 01:57
anything i do is free, I myself couldnt get the bars to work, thats why i resorted to the splat, lol.. did you try to make the text size to 1 on the xp text? xp however is something that dont need to be shown publicly, what im going to do is make a status menu in my menu system and show it there, maybe even press a button to show the panel with level and xp. I cant do much coding through the week though un fortunantly.
Markchapman10 is my Skype let's have some dev talk.
MahaGaming
8
Years of Service
User Offline
Joined: 4th Apr 2016
Location:
Posted: 24th Aug 2016 02:38
all the scripts dont work for me maybe im naming them wrong, could you do a dropbox please with lua scripts
PM
MChapman
9
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 24th Aug 2016 03:16 Edited at: 24th Aug 2016 03:26
just copy the function names use ctrl+c and right click the file name and rename and highlight the whole name and push ctrl + v and add .lua to the end of the name.

edit: I added the dropbox link to the end of the post.

also make sure your putting them in dynamic objects and inv_main and battery_cont scripts need to be always on.
Markchapman10 is my Skype let's have some dev talk.
pepesilvia
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location:
Posted: 24th Aug 2016 07:53
Sorry for the late response

@MChapman: Awesome thanks again for the free scripts and assets I can't wait to see what the final version will be like. Yeah I changed the text size, but I really want to use a bar/icons so I'm gonna learn how to work the percentages into the gameloop script. I saw Smallg has one for health with a blip ticker I'm probably gonna start there. I'm pretty sure I can get it to work with your g_exp table definitions, or hoping so lol That's a really good idea too, have a panel pop up with all your stats displayed
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 24th Aug 2016 10:08 Edited at: 24th Aug 2016 10:13
If you want to learn how to make bars then check out Tarkus's script HERE, he uses bars to show how hungry, thirsty etc you are, there's one lua script for each stat bar and a main control script for each stat.

I'm sure if you look into that script you will be able to work out how it works and adapt it for your own stats.

For example here is the hungerpanel.lua script



Note line 20: This line is the position of the pointer, and if you look in the numbers you will see 22.15+hungry ,26.5 this sets the position of pointer sprite to a default location PLUS the number held in the hungry variable.

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.

Login to post a reply

Server time is: 2024-12-23 07:25:54
Your offset time is: 2024-12-23 07:25:54