How can I restore the destroyed actor to restart a game?

Non-platform specific questions.

How can I restore the destroyed actor to restart a game?

Postby _Quarty_ » Sun Sep 04, 2005 10:57 pm

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... :oops:
_Quarty_
 
Posts: 5
Joined: Sun Sep 04, 2005 10:51 pm
Score: 0 Give a positive score

Postby jj2197 » Mon Sep 05, 2005 12:23 am

Use the LoadGame function.
Making Games == complex
User avatar
jj2197
 
Posts: 51
Joined: Sun Feb 06, 2005 10:01 am
Location: St. george
Score: 0 Give a positive score

There is'nt other way?

Postby _Quarty_ » Mon Sep 05, 2005 1:05 am

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.
_Quarty_
 
Posts: 5
Joined: Sun Sep 04, 2005 10:51 pm
Score: 0 Give a positive score

Postby makslane » Mon Sep 05, 2005 1:38 am

makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

More easy!

Postby _Quarty_ » Mon Sep 05, 2005 3:35 pm

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...
_Quarty_
 
Posts: 5
Joined: Sun Sep 04, 2005 10:51 pm
Score: 0 Give a positive score

Postby makslane » Mon Sep 05, 2005 5:23 pm

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;
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest