~Hakurei Shrine~ > Rika and Nitori's Garage Experiments

Some noobish questions

Pages: << < (6/6)

Iryan:

Mh. Do the "arms" of the cyclone have to unite? Because that would be... ewwww...

Another take on this cyclone thing would be to use object bullets...


--- Code: ---    task TBall(angle, rad, v, angv, graph){


        let obj = Obj_Create(OBJ_SHOT);

        Obj_SetSpeed(obj, 0);
        Obj_SetAngle(obj, 0);
        ObjShot_SetDelay(obj, 120);
        ObjShot_SetGraphic(obj, graph);

        let time=0;

        while(Obj_BeDeleted(obj)==false) {
           angle+=angv;
           rad-=v;

           Obj_SetAngle(obj, angle + 90);

           Obj_SetPosition(obj, GetCenterX+rad*cos(angle), GetCenterY+rad*sin(angle));
           
           If(rad<0){ Obj_Delete(obj); }

           yield;

        }

    }


--- End code ---


Naut:

CreateShotA a bullet with a constant angular velocity that has a slowing velocity, which will give it the whirlpool effect.

CreateShotA(0, GetX, GetY, 0);
SetShotDataA(0, 0, 3, angle, 2, -0.005, 0, RED12);
FireShot(0);

Iryan:

Yeah, but to get the correct values for the bullet to spiral towards a specific point requires some serious maths, doesn't it?

...wait, could it be that the center of the cyclone would be the center of the circle the bullet would move at if the speed didn't accelerate? Which would be... a circle with the radius r = ( (360/angular velocity)*v )/(2*pi)

Which would lead to the center position of... (X-r*cos(firing angle-90)| Y - r*sin(firing angle + 90) )....

Nah, that's probably wrong...

Pages: << < (6/6)

Go to full version