I am studying the Sprite sample, and would like to know if I am interpreting correctly.
1. I notice that the 'added' sprites all have the same name 'Sprite', (an unfortunate choice?) and that they are not directly referred to again but have been preset.
2. Also two empty sprites are used to take on the attributes of any two sprites that have collided and created an event.
What I don't quite follow is, why...
when a Sprite object is installed into the program from Add Object, why is this done for each required sprite?
I would have expected to add Sprite once as an object and then instantiated each new sprite required, in my code i.e....
add a sprite called 'Master' then
Master.New1("mySpriteA")
Master.New1("mySpriteB")
mySpriteA.velocity=10
mySpriteB.velocity=20
It seems that I must add every instantiation from the Add Object menu or have I got it wrong?
[Edit] In the instance of all these anonymous sprites that have been added above, if one DID want to suddenly refer to it, it would not seem possible because it doesn't have a name and there, as stated, doesn't seem to be a way to give it one (after the event?) [bad choice event] (after its creation.
1. I notice that the 'added' sprites all have the same name 'Sprite', (an unfortunate choice?) and that they are not directly referred to again but have been preset.
2. Also two empty sprites are used to take on the attributes of any two sprites that have collided and created an event.
What I don't quite follow is, why...
when a Sprite object is installed into the program from Add Object, why is this done for each required sprite?
I would have expected to add Sprite once as an object and then instantiated each new sprite required, in my code i.e....
add a sprite called 'Master' then
Master.New1("mySpriteA")
Master.New1("mySpriteB")
mySpriteA.velocity=10
mySpriteB.velocity=20
It seems that I must add every instantiation from the Add Object menu or have I got it wrong?
[Edit] In the instance of all these anonymous sprites that have been added above, if one DID want to suddenly refer to it, it would not seem possible because it doesn't have a name and there, as stated, doesn't seem to be a way to give it one (after the event?) [bad choice event] (after its creation.
Last edited: