so restricted .. >>(o.o)<<

This forum is currently in read-only mode.
  • well, lets say i want to make something move forward. the only way i know how to is add 'car' to the movement..but i dont want all the other stuff that comes with the car. isnt there any way at all to do what the 'car' movement thing does, but individualy?

    also, in the boxes where i must insert variables, for example when i hit the right arrow i want my object to rotate. in the X and Y boxes, what ppossible things could i put in there? i know numbers and negative numbers are alowed, and mouseY/mouseX is. what other imputs are available?

  • First you will need to add a Mouse&Keyboard object to your program.

    Since you're making a custom movement for your object, remove any movement plugins you have added to it.

    Then in the Event Sheet Editor, make a new event to check for controls being pressed:

    1. Right click the Event Sheet and select "Insert Event."

    2. Double-click the Mouse&Keyboard icon and select "Control is down." Click Next.

    3. Type the name of the control to check for in between the quotes. (The default key controls are called "Move Left," "Move Right," etc.) Your condition is now set up.

    4. Now click on "+ New Action" next to the condition.

    5. Double-click the sprite you want to move.

    6. Scroll down to "Size and Position" and select the appropriate Set command. For instance, if you want to move left or right, pick "Set X."

    7. A new window appears asking for the new X coordinate. We want to add to the coordinate while the key is being held down, so we need to call the current coordinate. Delete the "0" in the box and double-click your sprite.

    8. Scroll down to Size and Position and select "Get X." Click Finish.

    9. Now you will see the name of your sprite in the New Coordinate box. (You can type this in manually if you want, instead of clicking to pick your sprite.) If the player is pressing right, we want to add to this value. type in "+5" (without the quotes) after spriteName.X. Click finish.

    Your event is done. Now every time you hold down the right arrow, your sprite will continually move five pixels to the right every cycle.

    You can rotate the sprite the same way. Just create a condition, and in the new action choose an option under the sprite's Angle section.

    Hope this helps.

  • yes, it does, but what about top down 360 degree movement, thats what got the better of me

  • If you want say a top down guy walking around, you're best off doing what Ghost Shooter does: an 8 direction movement, and then Always set the player's angle towards position MouseX, MouseY. Then you can easily move in any direction whilst looking in any direction. If that doesn't suit your game, you'll have to describe better what you want.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • yes, it does, but what about top down 360 degree movement, thats what got the better of me

    I made a tut for you. http://scirra.com/phpBB2/viewtopic.php?p=1482

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)