GameMaker: Studio

GameMaker: Studio

View Stats:
Bullet trails problem
Hey, i need help with bullet trails
This is what happens, i have the trail (efc_bullet_trail)to have the direction face depending on the bullet (obj_bullet), the problem i have is, if i shoot another bullet, the trail seems to try to assimilate the direction of that new bullet, is there a way to "link" an object to what object created it instead of every single copy of that object?
< >
Showing 1-5 of 5 comments
Blind May 6, 2015 @ 8:56pm 
ya, have the smoke inherit the ID of the object creating it.

For example, if you are doing something like
instance_create(bullet trail)

You can do instead

bop=instance_create(bullet trail)

from then on, whenever you change the value of "bop" (from the bullet, not from the trail) it will change only the specific instance of bop. If you are creating multiple trails from the same bullet, they'd all be bop and would all change though - but other bullets wouldn't affect them. If you want them to individually animate you would have to come up with a new plan - such as a pathing sequence.
KoobyKarasu May 6, 2015 @ 9:13pm 
Originally posted by BBX:
ya, have the smoke inherit the ID of the object creating it.

For example, if you are doing something like
instance_create(bullet trail)

You can do instead

bop=instance_create(bullet trail)

from then on, whenever you change the value of "bop" (from the bullet, not from the trail) it will change only the specific instance of bop. If you are creating multiple trails from the same bullet, they'd all be bop and would all change though - but other bullets wouldn't affect them. If you want them to individually animate you would have to come up with a new plan - such as a pathing sequence.

I don't quite understand, i know if i make it bop, all the trails will be bop, but how can i make it so that the angle of the trail follows the bop?
Blind May 6, 2015 @ 9:15pm 
well, I don't know what you're doing with your smoke trail. typically a smoke trail is just a poof that fades out, with the bullet continuously generating them - and this would work in that context.

you would change it via bop.image_angle=whatever
Last edited by Blind; May 6, 2015 @ 9:15pm
KoobyKarasu May 6, 2015 @ 9:17pm 
Originally posted by BBX:
well, I don't know what you're doing with your smoke trail. typically a smoke trail is just a poof that fades out, with the bullet continuously generating them - and this would work in that context.

you would change it via bop.image_angle=whatever

It's not exactly a smoke trail, just a white line that shrinks and fades as it goes
KoobyKarasu May 6, 2015 @ 9:18pm 
Anyways, that seemed to work, thanks :D
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: May 6, 2015 @ 8:45pm
Posts: 5