0 Members and 3 Guests are viewing this topic.
.A0->Y->B->X->AClrDraw^^r[38283B123C501028]->Pic1A[1C14DC483C0A0814]->Pic1BRepeat getKey(15) ClrDraw Pic1A->O If getKey(3) Pic1A->O End If getKey(2) Pic1B->O End Pt-On(X/256,Y/256,O DispGraphEnd
If getKey(54) Pxl-On(X+8,Y+2)^rEnd.CODEHorizontal -^r
well, you can use velocities to determine how they'll move that's a simple way, though in Uncharted TI I do the dirty hack and just move it by one pixel per frame, since it's fast and small in code, and bullets are insanely fast anyways
Well, Axe doesn't natively support arrays, so you just have to reserve some memory and create your own [ad]http://clrhome.co.cc/resources/tuts/arrays/[/ad]
So is the example in that tutorial a bullets example? I did not really get it but I cannot read the whole thing now, I will later.
I moved this to the Axe Language board, as it was originally posted in the Asm Language board.What I normally do is store either 1 or 65535 (-1) to a variable and add that to its current X position to make it move.
Quote from: ztrumpet on May 21, 2011, 11:19:39 amI moved this to the Axe Language board, as it was originally posted in the Asm Language board.What I normally do is store either 1 or 65535 (-1) to a variable and add that to its current X position to make it move.But that implies having a variable for each bullet =P
You might also want to add another variable indicating which team (player or enemy) shot it. That way, when the bullet is shot, it doesn't affect the player who shot it. Either that, or you could use a time variable indicating how much time the bullet has existed (fresh bullets don't do damage, bullets that have existed too long are destroyed).