"LoadGame" has some script errors

Non-platform specific questions.

"LoadGame" has some script errors

Postby BloodRedDragon » Tue Jan 14, 2014 3:08 am

Loading problem....

The game runs fine so far, couple transition errors. I have done you the favour of making these transition errors transparent. So there are no real errors.
Click new game. Click skip. Game works fine. Shift to shoot, WASD to move

Then, when I press 'Q' to reset, the actors do not follow the view, and some of the ships are missing.
Why does 'loadgame' do this? Anyone have a fix?

This is a day before deadline which is Wednesday 10AM Greenwich (London) time so any help before then would be greatly appreciated. Even if it's 9AM wednesday morning, I may still have time to fix it.

Didn't attach a file because I'm not good with compression. Instead, here's a mediafire link. https://www.mediafire.com/?2rbcoxcpeiyllfi
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: "LoadGame" has some script errors

Postby skydereign » Tue Jan 14, 2014 4:50 am

That is a rather weird problem. I don't think I've ever encountered that before. What is happening is that the default actor structs are not being updated properly when the game reloads. So any use of actorName.actorVar won't work properly. As a quick fix to your problem, you can use getclone instead.
Code: Select all
getclone("hud")->x+=1; // do this for all actors

A potential other workaround would be to create an empty ged that calls LoadGame on your main file. This might force gE to update the structs. You could even use the ged as a loading screen.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: "LoadGame" has some script errors

Postby BloodRedDragon » Tue Jan 14, 2014 4:54 am

This should work, I have yet to try it because priorities with actual game content. Thanks ever so much.

If i use getclone would I have to destroy certain actors? I'm guessing it works the same way as cloning single actors with the actor control panel?
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score

Re: "LoadGame" has some script errors

Postby skydereign » Tue Jan 14, 2014 4:58 am

BloodRedDragon wrote:If i use getclone would I have to destroy certain actors? I'm guessing it works the same way as cloning single actors with the actor control panel?

No, the use of getclone is just a different way of referencing an actor. It really is just changing the way you change the variable. getclone doesn't actually create any actors, though that might be another way to fix your problem. If you on the q key press event destroy the actors that are causing problems, it might work.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest