-
Re: 360 degree shooting
[]
This is also way to advanced for me:
"set bullet x Pos to bullet value Start X + cos(bullet vaule angle) * steps
set bullet y Pos to bullet value Start Y - sin(bullet vaule angle) * steps" [/]
If thats to advanced then maybee you should study some more math... this is REALLY basic stuff...
-
Re: 360 degree shooting
[]
This is also way to advanced for me:
"set bullet x Pos to bullet value Start X + cos(bullet vaule angle) * steps
set bullet y Pos to bullet value Start Y - sin(bullet vaule angle) * steps" [/]
If thats to advanced then maybee you should study some more math... this is REALLY basic stuff...
-
Re: 360 degree shooting
Give me a break, I got an E in math. Anyways, I figured it out. The code is more like this I presume:
Alterable Value D( "bullet" )+Cos(Alterable Value B( "bullet" ))*Alterable Value F( "bullet" )
still don't understand that first part
-
Re: 360 degree shooting
Give me a break, I got an E in math. Anyways, I figured it out. The code is more like this I presume:
Alterable Value D( "bullet" )+Cos(Alterable Value B( "bullet" ))*Alterable Value F( "bullet" )
still don't understand that first part
-
Re: 360 degree shooting
"Create bullet, set angle, set speed, set start Y and set start Y."
what i mean by that is that you should create a bullet somewhere, perhaps when you press FIRE 1 or summin. In that event, set the bullets start X and Y to wherever you want it to start, and angle (0 - 360) and speed (0-whatever)
-
Re: 360 degree shooting
"Create bullet, set angle, set speed, set start Y and set start Y."
what i mean by that is that you should create a bullet somewhere, perhaps when you press FIRE 1 or summin. In that event, set the bullets start X and Y to wherever you want it to start, and angle (0 - 360) and speed (0-whatever)
-
Re: 360 degree shooting
I've succsesfully made your code. But I forgot to mention that I want it to aim towards a croasshair (the mouse) and I want to randomize the direction a little
-
Re: 360 degree shooting
I've succsesfully made your code. But I forgot to mention that I want it to aim towards a croasshair (the mouse) and I want to randomize the direction a little
-
Re: 360 degree shooting
there are a couple of examples around that cover getting an angle between two points, i made one a while back aswell that involved direct hitting lasers:
http://clickteam.com/center/showflat.php/Cat/0/Number/1015/an/0/page/7#Post1015
if you check the 'laser' object's behaviour there is a part of the code that gets the angle from its x and y to a target x and y.
if you want the angle to vary a little just add + random(5) - random (5) to angle. Or whatever value you would like.
-
Re: 360 degree shooting
there are a couple of examples around that cover getting an angle between two points, i made one a while back aswell that involved direct hitting lasers:
http://clickteam.com/center/showflat.php/Cat/0/Number/1015/an/0/page/7#Post1015
if you check the 'laser' object's behaviour there is a part of the code that gets the angle from its x and y to a target x and y.
if you want the angle to vary a little just add + random(5) - random (5) to angle. Or whatever value you would like.