having a little trouble with object lasers, I'm trying to make a laser then move it across the screen.
I did this
let las1 = CreateStraightLaserA1(-2*x1+xOffset,y1-3*x1*tan(theta),theta,2000,width,500,8*20+8%8,40);
wait(20);
ObjMove_SetSpeed(las1,3);
it made a bunch of lasers, each moving to the right
I tried manually moving it,
let las1 = CreateStraightLaserA1(-2*x1+xOffset,y1-3*x1*tan(theta),theta,2000,width,500,8*20+8%8,0);
wait(20);
let newX = ObjMove_GetX(las1);
loop(GetStgFrameWidth){
newX = newX+4;
ObjMove_setX(las1,newX);
}
also didn't work. and I had to change the delay to 0 so it would have a hitbox at any point. I just want one solid laser to move after spawning.
It seems that a laser is just a series of stretched out bullets that continuously spawn from the spawning point, I could just make an object bullet that has those properties and won't disappear when you hit it, but I'd rather learn the right way if at all possible.