Product Chat / Variables

Author
Message
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 14th Jan 2016 12:41
Is there any way at all to carry over a variable value from level/map and check it and use it in another level/map.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 14th Jan 2016 12:52
You would have to save your data to a file and read it in from the secondary level. I've only played with this a little, as most stats I wanted to save are not possible to actually use when loading the data back in For any custom variables and such it should be fine though.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 15th Jan 2016 18:55
Make a winzone that saves your variables to file, and in the next level create a "memoryzone" that loads your variables. For example I've made a script (winzone+memoryzone) to store data from my RPG scripts. If don't need the RPG variables, just ignore them or replace them with your own variables. The script stores health and lives anyway. The code can be found in this thread in the first post:

https://forum.game-guru.com/thread/213751#msg2532924

Storing weapon data is bit more difficult, but possible. Housetroll has created a script for that:

https://forum.game-guru.com/thread/213084#msg2529495
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 15th Jan 2016 20:40
Nice work, thank you!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM

Login to post a reply

Server time is: 2024-11-25 07:53:42
Your offset time is: 2024-11-25 07:53:42