The Daily Click ::. Forums ::. Klik Coding Help ::. Copied object saving
 

Post Reply  Post Oekaki 
 

Posted By Message

BBalazs



Registered
  10/07/2004
Points
  41
31st August, 2004 at 03:07:42 -

What is the best method to save a platformer game if there are objects copied with Ctrl+C Ctrl+V and they are moving the same, but if one is hit by a bullet it dies but the other continues being active. I can't find a way to handle them as seperate objects in the savegame routine. What object would be the best? An array? The INI (which I don't really prefer)? The savegame.cox?

 
n/a

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
31st August, 2004 at 06:13:36 -

have you tried

+start of level
-spread value "1" in "Active Enemy Alterable Value 1"

then for saving:

+start loop "save" for "Number of Enemies" loops
-set ini group to "enemies", set item to "loopindex("save")", set value to whatever you're saving

and the same deal for loading, if you see what i mean.

 
www.thenatflap.co.uk

BBalazs



Registered
  10/07/2004
Points
  41
31st August, 2004 at 08:18:20 -

It sounds a bit complicated - you see the objects disable themselves when shot: collission with bullet=>destroy object + create object "dead enemy" at 0,0 from object.

There can be let's say 7 active and 3 dead enemies at a time, the 7 active enemies are in a different position. We need to save their X,Y positions, but in case of loading, their movement restarts and they basically go through a wall most of the time, or at least their movement path will be totally different.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click