Author Topic: How do i aim the spawn projectile event?  (Read 4374 times)

well,when i spawn a projectile from a brick with events,it makes it always go the same direction. please tell me how to aim projectiles! i am going to make a tank out of bricks,so i need to know.

on player touch ----> player spawn projectile ----> [100] rocket [] [] []

on player touch ----> player spawn projectile ----> [100] rocket [] [] []
so this is how you aim where the progectile goes?

so this is how you aim where the progectile goes?
Yes and no. He is giveing you an example but when you go into the acctuall events and see the
[] [] [] [Projectile here] [] [] []. The very first box represents up and down leave it positive to go up and place a - sign in front of it for down the 2nd and 3rd are left right and infront and behind. Again left positive while right negative and infront positive and bacoward negative.
So you can aim it like that and the ones on the right side of the projectile... if im correct... is imputting a speed and it randomly selecets which direction depending on which box the numbers were entered in the first set [] randomly up or down second [] left right random and third set [] or backward. I hope this helps :)

sucon, you actualy don't know what you're talking about :D
the first 3 aim it, then the last 3 boxes randomize the speed/give it spread
that is for use with input>self/namedbrick>spawnprojectile

but if you use input>player>spawnprojectile[A][projectile][C][D]
then A is the velocity forwards, and BCD are the spread

sucon, you actualy don't know what you're talking about :D
the first 3 aim it, then the last 3 boxes randomize the speed/give it spread
that is for use with input>self/namedbrick>spawnprojectile

but if you use input>player>spawnprojectile[A][projectile][C][D]
then A is the velocity forwards, and BCD are the spread
thank you both of you. i will try it out this afternoon.

sucon, you actualy don't know what you're talking about :D
the first 3 aim it, then the last 3 boxes randomize the speed/give it spread
that is for use with input>self/namedbrick>spawnprojectile

but if you use input>player>spawnprojectile[A][projectile][B][C][D]
then A is the velocity forwards, and BCD are the spread

HOW TO AIM stuff

The first value is more important, and can be a little confusing.


Directions
    N
W    E
    S

X / Y axes
    y
-x    x
   -y

(x,y,z)

100, 0, 0 fires directly east.
-100, 0, 0 fires directly west.
0, 100, 0 fires directly north.
0, -100, 0 fires directly south.
0, 0, 100 fires directly up.
0, 0, -100 fires directly down.

100 100 100 will fire northeast at a 45 degree angle upward.



The second value is spread, and can be valuable if used right.

Let's assume you are firing directly sideways.

25, 0, 0 will vary the velocity across the x-axis.
For every projectile that is fired, instead of, for example, 100 100 100, it will be varied between 75 100 100 and 125 100 100.
If you are firing directly east or west, some projectiles will be slow, and some projectiles will be fast.
If you are firing directly north or south, the projectiles will spawn at random angles.
25 25 0 will also vary their velocity on the y-axis (north/south).
It won't matter which direction they fire, they will go at random angles and speeds.
0 0 25 will create random angles up or down. If you are firing straight up, they will have varied speeds.
25 25 25 creates a "perfect" spread, and will equally vary angles/height/speed no matter what direction is set.



Dont spam stuff by overfiring.  you may be called "noob" just as a fair warning.


BUMP
You've already gotten a very well done and thorough answer. What more do you want?