Product Chat / Multi Level

Author
Message
Mr Xela
8
Years of Service
User Offline
Joined: 27th Dec 2015
Location:
Posted: 7th Aug 2016 17:41
Hello everybody of GG I was curious as to if I do a survival game with the script added into 1 level then I enter another level (map and a completely new one) will the script from map 1 enter into map 2 and beyond? Or would I need to re-add the same script(s) into each map of the same kind to keep the same theme of the game going?


Sorry if it's not descriptive enough but I would assume it's straight to the point.


Asking before I start I don't wanna waste time on the maps then it doesn't work ya feel me?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 7th Aug 2016 17:47
you need to add the scripts to each level to keep the functionality but with a little work you can read previous level values for the new level.
i.e. if you wanted thirst meter on all your levels you will need to assign a script to track it for every level but you can carry over the value from level to level.
variables need to be in the format 'g_' to save automatically
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Mr Xela
8
Years of Service
User Offline
Joined: 27th Dec 2015
Location:
Posted: 7th Aug 2016 17:51
Oh thanks Smallg! Wasn't entirely sure if it carried over from level to level or what the deal was.

PM

Login to post a reply

Server time is: 2024-11-24 23:17:03
Your offset time is: 2024-11-24 23:17:03