Jump to content


MrWoz

Member Since 16 Sep 2010
Offline Last Active Nov 28 2012 09:32 AM

Topics I've Started

Changing an instance, keeping the sprite index

13 May 2012 - 08:41 PM

Hi everyone, first off thanks go to anyone who takes the time to read and try and help me.
In my game, after a period of time an instance is changed into another one. Can anyone tell me
how to find out what sprite index the changed instance had? eg I have 2 objects Obj_Alien1, Obj_Alien2
and 3 alien sprites Spr_Alien1,Spr_Alien2,Spr_Alien3. On level 6 of my game i have used the code
sprite_index=choose(Spr_Alien1,Spr_Alien2,Spr_Alien3) so now all the Obj_Alien1 objects have random
sprites assigned to them. When one of the instances gets changed into Obj_Alien2 i need to assign the same
sprite index to it.
Many thanks
Paul