Page 1 of 1

"LoadGame" has some script errors

PostPosted: Tue Jan 14, 2014 3:08 am
by BloodRedDragon
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

Re: "LoadGame" has some script errors

PostPosted: Tue Jan 14, 2014 4:50 am
by skydereign
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.

Re: "LoadGame" has some script errors

PostPosted: Tue Jan 14, 2014 4:54 am
by BloodRedDragon
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?

Re: "LoadGame" has some script errors

PostPosted: Tue Jan 14, 2014 4:58 am
by skydereign
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.