Specific sprite movement
-
@LinkCraft have you tried setspriteorigin to move the axis
-
@LinkCraft said in Specific sprite movement:
Lol I’ll probably have to to something else thanks for the help though
Could you friend share your code? It’s easier to spot the problem then...
-
This post is deleted! -
I made some changes to make it easer to understand but this is what I’m at so far
It sucks to get stuck in making a game from so early on lol
Planespeed = 10 Pr=0 Planeimg = loadimage(“plane”) Plane=createsprite() Setspriteimage(plane,planeimg) Setspritelocation(plane,gwidth()/2,gheight()/2) Setspritesvale(plane,{2,2}) Loop Clear(skyblue) C=controls(0) If (atan2(c.lx,c.ly)) < pr then Pr-=5 Endif If (atan2(c.lx,c.ly)) > pr then Pr+=5 Endif Setspriterotation(plane,Pr) Drawsprites() Update() Repeat
-
I’m trying to make a game like Man vs. Missiles if that helps.
-
-
You’ll probably want a ’desiredAngle’, ’currentAngle’, and ’turnspeed’ variables for your plane. It shouldn’t be too crazy hard to get it turning the right way. I bet there’s a smart-ass one-line trick that programmers know, but don’t worry if you figure out a dumb long clumsy way - as long as it works :)
-
I don’t care if it’s 100 lines I just want it to work Lol. I’ll check that link out later today Almost all websites are blocked on my phone (thankfully not fuze arena) and my dad uses the computer for work all day so I just have to wait until he’s done. :)
-
This post is deleted! -
@DomDom
Is that working? -
This post is deleted! -
Ok perfect all give it a go thanks so much
-
@DomDom Could you please just explain the code a little bit, and especially the use of the dot product?
I know it’s something I was taught in school, but it’s all a bit hazy...
-
This post is deleted! -
Thanks a lot! I have been wrestling with vectors these last few nights, and the dot product seems to actually be able to solve a few a my problems.
Great explanation!
-
Starting to have a game come along!!! Thanks for the help :)
-
This post is deleted! -
That has a very "Time Pilot" feel
-
@pianofire That game hurts my hand. My high score is 137k. :P
-
@Jongjungbu Yeah me too. I can't remember my Hi-score but I was pretty good at it