Product Chat / Move all mercenaries with the player to the lext level..

Author
Message
Zaldibar Giradin
5
Years of Service
User Offline
Joined: 27th May 2019
Location:
Posted: 28th May 2019 14:23
Hello, we are stuck on an issue and reaching out to whom has this knowledge. I have a few mercenaries in my scene and some will die helping the master player and some will live. Once the player reaches the win zone we want to move to the next level but also we want our mercenaries also to move with the player to the next level if their still alive.
If you can point me and my comrades in the right direction we surely will appreciate it very much...

Thank You from Zaldibar and Margrave...
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 28th May 2019 17:03
For your mercenaries im assuming those are other entities on the map? On the following levels you will need to have those same entities located on the following map near the player marker.
Youtube - Teabone3 | Store Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Zaldibar Giradin
5
Years of Service
User Offline
Joined: 27th May 2019
Location:
Posted: 28th May 2019 20:02
Yes, That does work however let's say that you start off with 4 mercenaries and two died in the first level when you get to the next level you will start again with 4 mercenaries which should only be two where you left off on the first level.
I'm sure we'll need to script it I'm just not sure what the function name would be called. I'm thinking a save/load script.
Also we are wondering if there's even a save/load script that exist out there for purchase that can transfer our mercenaries across levels?

Thanks T...
PM
Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 28th May 2019 21:05
I can be wrong but I am pretty sure this is not possible.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th May 2019 21:49
you will need to read & write to a file to store some variables (like the HP of each of the mercenaries at the end of the level)
there's some examples on the forums, but the basics is like this
then put some code like

in the script being run by the mercenaries to remove the mercenaries that died in the previous level
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Zaldibar Giradin
5
Years of Service
User Offline
Joined: 27th May 2019
Location:
Posted: 29th May 2019 01:56
Hello smallg, Thank you for the info, it is exactly what we was looking for. we'll take your scripts and modify them and hope it works. BTW we love your scripts Thanks again..




PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 29th May 2019 03:39 Edited at: 29th May 2019 03:39
my goodness i actually almost forgot about the read write file stuff. this would actually solve a LOT of memory problems with GG. Have each level remove all of whats in memory and just reference the file that was written to in the previous level to build the variables and etc again.



i know others mentioned this method, but thank you for the reminder and guide line!
Youtube - Teabone3 | Store Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 4th Jun 2019 20:59
Oh!! I stand corrected then

Login to post a reply

Server time is: 2024-10-06 20:17:19
Your offset time is: 2024-10-06 20:17:19