Product Chat / Acid's Money script: Remeber money amount in next level...

Author
Message
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 26th Jan 2017 20:10
Hey guys,

I just wanted to ask if it is possible to do a script wich makes the money system remember the amount of money you had in the previous level.
It's kind of unfortunate that it does not carry the money over to the next level.

Any help would be much apreciated !

Kind regards
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, AMD Radeon R9 270X

Youtube:
The German Music Dude: https://www.youtube.com/user/DeutscherVolker
DK Productions: https://www.youtube.com/channel/UCIqwvScXnJL_zNYqSsfTCqA
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 26th Jan 2017 20:16 Edited at: 26th Jan 2017 20:17
To start with, it's a player made 3rd party script so you really need to PM Acid if you want anything to happen, we can't really help you much, however, it should be easy to convert it to globals, all you need to do is find the variable in each script that controls the money amount and make it global.

So if the variable is say for example:

money = 0

then find every single occasion of money in each of his scripts and change it to

g_money

that should make it carry over

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 26th Jan 2017 20:17
will try ! Thanks belidos !
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, AMD Radeon R9 270X

Youtube:
The German Music Dude: https://www.youtube.com/user/DeutscherVolker
DK Productions: https://www.youtube.com/channel/UCIqwvScXnJL_zNYqSsfTCqA
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Jan 2017 09:43
You'll also need to make sure the value isn't being reset if the script is used in the next level(s)
I.e. where it says money = 100 (or whatever value) at the top you'll need to change it to
if g_money == nil then
g_money = 100
end
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 27th Jan 2017 09:58 Edited at: 27th Jan 2017 10:00
Or you write it down in an extra file. Then you can carry a lot more vars. I did it here with health but you can do it with any vars you want
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM

Login to post a reply

Server time is: 2024-07-05 11:32:32
Your offset time is: 2024-07-05 11:32:32