Wakey's Forum Posts

  • 2 posts
  • I'm trying to change an animation frame based on the mouse's position relative to the object.

    I believe I've been through all the events and actions and searched Google multiple times. I just can't find a combination or answer that'll do what I'm looking for.

    Here's a couple of frames of my player object:

    <img src="http://s7.postimage.org/e1naxmwo7/test01.png" border="0" /> <img src="http://s12.postimage.org/xi15t9lvt/test02.png" border="0" /> <img src="http://s17.postimage.org/girza7yuj/test03.png" border="0" /> <img src="http://s4.postimage.org/wz6q35ghl/test04.png" border="0" />

    As you can see, "Set angle toward position" just doesn't cut it <img src="smileys/smiley2.gif" border="0" align="middle" />

    Say the mouse is at an angle of 90 relative to the object, it would show the first picture. And so on...

    How would I go about doing something like this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So... I'm completely new to this software. Came here from Gamemaker to see what was going on over here <img src="smileys/smiley2.gif" border="0" align="middle" />

    Anyway...

    I got a sprite with the 8Direction behavior. What I want to do is bind the Max Speed with an Instance Variable (Since I can not find a subtract/add event linked with Max Speed).

    Say it starts at 200. When I click ctrl it subtracts 100. Shift adds 100.

    So I don't have to hold down a key to change the speed. I tab it.

    Now I can imagine Gamemaker isn't too popular over here?

    But just to show what I mean in GML:

    I got a variable called playerSpeed and code looking like this:

    if keyboard_check_pressed(vk_shift)

    {

    playerSpeed += 100

    }

    if keyboard_check_pressed(vk_control)

    {

    playerSpeed -= 100

    }

    if (playerSpeed > 300)

    {

        playerSpeed = 300

    }

    if (playerSpeed < 100)

    {

        playerSpeed = 100

    }

  • 2 posts