How do I move up and down and rotate in same time

Just started using Construct 2? Post your questions here

Post » Tue Oct 21, 2014 11:38 am

Dear friends,

After a week of trying and reading, without any success, I would be very happy with someone's help.

I have the feeling it's simple, but I can't see the solution.

- I want to constantly move a column of six sprites (part of a machine) synchronously up and down say 100 pixels, at an adjustable speed.
- Also do the six sprites on their way up rotate, synchronously, slowly from -15 degrees to +15 degrees.
- On their way down they rotate slowly back to their start position of - 15 degrees.
- The sprites have to transport a ball, so I guess they need the physics behaviour, so the ball can't fall through the sprites.

If I have two of those systems next to each other, moving in opposite directions, the ball will be put from the lowest sprite to the sprite next to it and will be lifted automatically via via, to the top sprite where it finally leaves the elevator.

there are many roads to Rome as they say, but I did not find the right one...
Or I could not control speed, or the movements where not fluently enough, or the sprites did not move synchronously, or the sprites did not constantly moved as a machine should.


All help will be appreciated very much.
Thanks in advance.

Philip
B
5
Posts: 14
Reputation: 260

Post » Tue Oct 21, 2014 2:27 pm

A graphic would help understand better. If I get your meaning, I would make the 6 sprites part of a family, and use the family to set the movement in unison. like using Rex's "Move to" plugin for specific movements. As far as the rotation goes, I would make the 6 sprites animations to handle the rotation and set collision properties for each frame of the animation.

Hope this helps.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue Oct 21, 2014 11:11 pm

Heres an Idea.... use separate instances of the objects in question, sprite1 sprite2 sprite3.

use the "rotate behavior for each one.
map the pixel potions of each object in the editor by selecting the object in the editor and dragging it up,( whiles keeping your eye on the position in pixels)

pin all the sprites together, (position only)

lets say at pix 100 you want the speed to increase to 20 rotations per second?
create an event that tell the sprites to do just that. signal up, or down with 2 boolean variables flipped at the top and flipped at the bottom.

increase speeds on up variables, and decrease speeds on down var.
Image
B
26
S
4
G
3
Posts: 147
Reputation: 4,875

Post » Wed Oct 22, 2014 10:25 am

Thanks TheDom and TonyW,

This is just what I needed. Sometimes one need some help to get on the right track, because one stays thinking in circles.
Thanks also for the advice to look at the site of Rex's Plugins and Behaviours. Wow, amazing what we can find there. I did feel like a child in a candy store. This will make life of a 'Constructor' much easier.

Thanks a lot both, you were of great help!

Philip
B
5
Posts: 14
Reputation: 260


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest