Question About Behaviors

For questions about using Classic.

Post » Tue Oct 07, 2008 7:07 pm

Ive been playing around with construct for a couple of days now, and came up with a question about behaviors. Is it possible to modify them in any way? Specifically, is it possible, say, with the car behavior type to change it so that it simply turned when the left or right button was pressed instead of needing the forward press as well? I played around with making a similar behavior pattern using just the event sheet editor, with limited results. Any input would be appreciated. Thanks!
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Tue Oct 07, 2008 7:14 pm

if i understand you correctly, you want the car to move automatically without a 'forward' input - but still let you turn. you can do this by doing

always
- Car: set speed to x

and x = how fast you want to go (200 or whatever).

edit: if you dont' want it to move when you're not pressing anything, do this:

Key Left Arrow is down
OR
Key Right Arrow is down
-Car: set speed x
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Tue Oct 07, 2008 7:29 pm

Ok, perhaps I need to clarify a bit. I was hoping to set up the controls similar to this:

Forward arrow: Apply thrust
Right arrow: Rotate/Turn right
Left arrow: Rotate/Turn left

The hope was to be able to modify one of the existing behaviors so that I could apply it to a number of different ships (the goal is to create a little space shooter similar to star control/the ur-quan masters). I have looked at the spaceship.cap demo file and found it to be very helpful, but wanted to apply a similar movement principle without the mouse being the guide for the ship so that hotseat (or eventually network) play could be functional.

Another related question: is this where the timedelta function could be used? I have little to no experience with that function.
B
2
G
4
Posts: 49
Reputation: 1,148

Post » Tue Oct 07, 2008 7:43 pm

oh, spaceship controls. well using the car behavior --

Key Right arrow is down
+is not moving (do 'is moving' and then invert condition)
--ship: rotate x degrees clockwise

Key Left arrow is down
+is not moving (do 'is moving' and then invert condition)
--ship: rotate x degrees counter-clockwise

so that when you aren't moving, it will rotate when pressing left or right. if you omit the 'is not moving' condition, it'll still work.. but it'll be pretty wonky when moving because of the extra rotation.
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Tue Oct 07, 2008 7:52 pm

Ok. Thanks, ill give that a shot.
B
2
G
4
Posts: 49
Reputation: 1,148


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests