Sliders

Get help using Construct 2

Post » Mon Sep 16, 2013 1:11 am

https://www.dropbox.com/s/16m8tcxrtc0ytuw/scram.capx I am making a nuclear reactor game. This is what I have so far. I'm trying to be able to control the control rods (sprite2) by clicking on them and moving them up and down.

https://www.dropbox.com/s/16m8tcxrtc0ytuw/scram.capx <- this is what I'm basing my event system on

It doesn't seem to work when I try to convert it.
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Mon Sep 16, 2013 9:37 am

@ryackov

Take out the second line. Mouse : Left button down
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Mon Sep 16, 2013 8:17 pm

I see. My only problem now is how do I deselect the rods, and how do I get the rods to slide up.
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Tue Sep 17, 2013 1:23 am

I figured out that I had to invert the second line in order to get it to work.

Still working on reversing the direction of the rods.
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Tue Sep 17, 2013 2:55 am

Yeah. I was going to say your line 2 should be "On Left button released" with the action "Set picked to False" to deselect the Sprite 2 rods. Are you trying to get the rods, Sprite 1, to change the animation frame based on the height of the Sprite 2 rods?
B
5
S
1
Posts: 15
Reputation: 405

Post » Tue Sep 17, 2013 3:20 am

Oh uh. The Sprite 2 is the control rods. The Sprite 1 is the fuel rods.

I'm not planning on changing any animation frames based on the height of the control rods. It's an unimplemented feature. Basically it will be this: height of control rods > sprite 1 temp variable > animation frame of sprite 1. But it's wholly unimplemented.

I'm trying to guess how to get the control rods (sprite 2) to pull up, instead of down.
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Tue Sep 17, 2013 5:28 am

This may be what you are looking for then,

http://www.scirra.com/forum/sprite-move-away-from-mouse-drag_topic75955.html
B
5
S
1
Posts: 15
Reputation: 405

Post » Tue Sep 17, 2013 8:35 pm

No. I'm trying to raise the rods up, not down. Raise the rods up with the cursor.
B
9
S
3
G
1
Posts: 191
Reputation: 1,725

Post » Tue Sep 17, 2013 10:38 pm

I was able to get the ControlRods to move inverted based on the Mouse.Y value. I had to disable the "System > Every tick" event as there is an action that is preventing the ControlRod X from going above the FuelRod X. Feel free to poke around to get that resolved.

Here is the .capx for the inverted movement:
https://www.dropbox.com/s/c2b6y73ybymiz4m/ControlRods.capx
B
5
S
1
Posts: 15
Reputation: 405

Post » Tue Sep 17, 2013 10:50 pm

Resolved the clamp command to allow movement upward instead of downward. Added comment describing what was changed.

https://www.dropbox.com/s/71rkdvvtn0lf88c/ControlRodsNew.capx
B
5
S
1
Posts: 15
Reputation: 405

Next

Return to How do I....?

Who is online

Users browsing this forum: AmpedRobot, plinkie, ST314 and 21 guests