0 Favourites

How do I add a boost with 8direction?

  • Ok I am having a problem. I have a character that boosts in the last direction of the 8direction.moving angle. I want it to be able to boost in that direction... I set it to the bullet behavior and the angle to a variable that triggers when the player moves only once.

    so I dont really know pseudo code, but

    //8direction-Is moving>set a to ceil(8*(1+self.8Direction.MovingAngle/360)-.5)%8

    set animation to "run"&self.a (play from beggining)

                 ----->triggeronce>setm to self.8direction.movingangle

    //8Direction is NOT moving> Set animation to "idle"&self.a (beggining)

    Trigger once

    //keyboard/on space pressed>/set animation to "bite"&self.a (beggining)

    /start ignoring 8dir.

    /Set Bullet Speed to 500

    /wait 1/8 seconds.

    /set bullet speed to 0

    /stop ignoring 8direction

    /set animation to "idle"&self.a

    //every tick set bullet angle of motion to self.m degrees

    The problem is when I move up or down it moves slightly right...

    Is there a better way to do this?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • anyone?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,155
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,736
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
0 Favourites
Why is Stencyl doing better?
44 16,859
Potato's avatar
Potato