How do I - Change the apperance of a sprite [SOLVED]

Just started using Construct 2? Post your questions here

Post » Wed Jun 01, 2016 7:45 am

Hi

Following on from my last post "How do I - Move toward another sprite" , now the enemy sprite overlaps the target sprite all good. However the next behaviour is that while the enemy sprite is overlapping for a period of time, after a given time the target sprite needs to start changing its apperance.

I first tried using the is overlapping event and then place a wait seconds action and then stated to change the sprite for another. This did just that but then the enemy sprite disappeared and on running this through the debuger it look as though changing the sprite to another seemed to create more memory

Is there a better way of changing the apperance of a sprite either with another sprite or by changing its colour etc.

Thanks

TimCS
Last edited by timcs on Fri Sep 09, 2016 9:31 pm, edited 1 time in total.
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Wed Jun 01, 2016 8:01 am

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jun 01, 2016 9:01 am

99Instances2Go wrote:https://www.scirra.com/tutorials/413/direction-based-sprite-animation


Thanks 99Instances2Go , trying to get used to how construct 2 works over other game engines that I have tried. They all seem to do these things differently. So would using the method of spawning another object only work to a) replace the existing one and b) any other object attached to it also be removed?

From other software there has been a change image action but I presume the animation is the same ?


Thanks

TimCS

p.s. it is making such a difference to me with the prompt and helpful replies over other forums that I have been on :)
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Wed Jun 01, 2016 11:07 am

Ah yes.

You can also use an animation to present frames as stills.
Just set the speed of the animation to zero.
Now you can use sprite > action > Set frame

Notice that everywhere there is an index (a frame"s number = an index) it is ZERO BASED.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jun 01, 2016 12:01 pm

99Instances2Go wrote:Ah yes.

You can also use an animation to present frames as stills.
Just set the speed of the animation to zero.
Now you can use sprite > action > Set frame

Notice that everywhere there is an index (a frame"s number = an index) it is ZERO BASED.


Okay thanks for the heads up, basically the same principle as an array then :) So i will need to set the target images with a series of frames that can imitate the stages of the targets when they change their state.

Thanks again 99Instances2Go

TimCS
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest