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]
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.
Thanks in advance :)
Set vector X and Y work for me when doing my Wall Jumping while not on the floor.
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. ^^
Develop games in your browser. Powerful, performant & highly capable.
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?