How do I change pose of my character

Get help using Construct 2

Post » Thu Jan 02, 2014 8:28 pm

create sprite 2 at sprite1.x,sprite1.y and destroy sprite1 in the same event, next action.

but why anyone would use this instead of using animations is quite a mystery to me.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 02, 2014 8:30 pm

creating and destroying a sprite from the same char seems a bit too much if you ask me.

Simply add more frames to your sprite. Right click in your frames bar and import second frame/sprite.

now you have 1 sprite, 1 animation, with 2 sprites from the same character.



[QUOTE=lennaert] yes

Set animation speed to 0

instead of set animation, use set frame.[/QUOTE]


Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Thu Jan 02, 2014 8:45 pm

I understand that destroying and creating a sprite may be too complicated but I prefer code more than animations. Anyway thanks both of you for helping, I'll try both solutions and use one that looks better.
B
4
Posts: 8
Reputation: 292

Post » Thu Jan 02, 2014 10:04 pm

You are creating double work you know need to code both sprites to respond to input an collisions. Better is as was mentioned place all animations in the single sprite call them as needed.

The double sprite method will make you need to track instance variables manually things like life will need to be shared between the objects. carrying objects as well. Making sure the new object is set at correct speed direction etc. theses will become tedious as you continue to build the game. Rethink your strategy and then discipline yourself to smart coding vs hard coding....

Best luck to ya.
B
28
S
5
G
2
Posts: 76
Reputation: 3,085

Post » Fri Jan 03, 2014 9:43 am

I see your point, but thing is that life is shared between sprites. Both of sprites have car behavior, but Sprite1 has drift recover 150 and max speed 300, while Sprite2 has drift recover 200 and max speed 250. I don't know if I can do that with animations, change speed and drift recover.
B
4
Posts: 8
Reputation: 292

Post » Fri Jan 03, 2014 9:47 am

Car if animation1 is playing
-set max speed
-set drift recover

Car if animation2 is playing
-set max speed
-set drift recover

should be easy enough, right?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 03, 2014 10:24 am

Sure. I will try both ways and which looks better will be in my project.
B
4
Posts: 8
Reputation: 292

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests