Sonic The Hedgehog's Homing Attack

0 favourites
  • 6 posts
From the Asset Store
Hybrid Sonic Branding Kit is a business identity & motion graphics sound effects library.
  • Hey guys!

    So I had an idea for this game. Basically, it's a platformer.

    I wanted to give the character a Homing Attack, just like Sonic's.

    Initially, I thought of something like this:

    <font face="Verdana, Arial, Helvetica, sans-serif">Keyboard: On [jump button] pressed

    Player: Platform is NOT on floor

    -> Set Platform Vector Y to 0

    -> Set Platform Vector X to [some number]

    </font>

    Of course, I'm verifying which side is the player looking at.

    Thing is, whatever the number I use on the Vector X the character goes just a bit to the left (or right), to the point I'm currently using 40000 :P

    The Y Vector to 0 is working fine though.

    This event probably doesn't work when the platformer is not on the floor.

    Any ideas?

    Thanks in advance :)

  • Set vector X and Y work for me when doing my Wall Jumping while not on the floor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd deactivate the platform behavior, set a var to 1, and while that var is 1 move your player by angle(self.x,self.y,enemy.x,enemy.y) until collision, then restore platform behavior and set var to 0. Bada bing, bada boom. Don't forget to pick nearest enemy.

  • Great idea! I'll formulate on that!

    Thanks Tokinsom :)

    BTW BluePhaze, Vector X did work with me, but I had to mess with max acceleration, speed and other platform behavior stuff that just wouldn't give me the result I was looking for. Also, I love your tutorials. ^^

  • I'd like to get a bit more detail on this, myself, as I'd like to have something similar in my own game.

  • What kind of detail?

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