How can I restore the destroyed actor to restart a game?
Posted:
Sun Sep 04, 2005 10:57 pm
by _Quarty_
Playing with a game, some actors can be destroyed, moved and all types of modifications respect the initial position.
How can I restore all to start a new play.
TIA
Sorry for my English...
Posted:
Mon Sep 05, 2005 12:23 am
by jj2197
Use the LoadGame function.
There is'nt other way?
Posted:
Mon Sep 05, 2005 1:05 am
by _Quarty_
OK, but that delete all advances in games. For example, to retry to play level 4 in a game, LoadGame() force to start at level 1, but to play level 4 without restarting game, I need to restore all object to original position, and recover the destruction objects.
Understand me?
Other cuestion (I'm think to create the levels in realtime), how can I to get properties of a created actor in Realtime? For example
for (cont=0;cont<=100;cont++)
{
CreateActor(MyModel, "1", "no parent", "no path",....
}
How can I change the animpos (for example) in object 25?
It's not possible:
MyModel.25.animpos=4;
Or this try:
MyModel[25].animpos=4;
I think that the documentation is very simple, and poor in GE exclusives therms.
Thank you for your response.
Posted:
Mon Sep 05, 2005 1:38 am
by makslane
More easy!
Posted:
Mon Sep 05, 2005 3:35 pm
by _Quarty_
Thanks. This function is very interesting, but I found other method more easy... not destroying the actor!
I'm simple set visibility to disabled where collision or shooter (for example), and when restarting level play, only need to set visibility enabled entire type of actor (enemies, rocks, items...) Works and is easy...
But, my other question is alive... how can I to get properties of a created actor array in Realtime with CreateActor() funtion in script? You know, multiple enemies created in realtime with random function, for example, to be moved, or change animation in one specefic...
(I was read the docs, but not see nothing about it)
Thanks in advance...
Posted:
Mon Sep 05, 2005 5:23 pm
by makslane
You can use the getclone function:
getclone("MyModel.25")->animpos=4;
Or the jazz_e_bob getclone2 function (
http://www.game-editor.com/forum/viewto ... t=getclone):
getclone2("MyModel", 25)->animpos = 4;