specifying a location on an actor

TheBasedAbel

  • Posts: 24
So i have a boss character who charges a laser (by creating a "laser" actor at the coordinates the barrel is located) my issue is that if I want him to move around, the Laser actor does not move with him, is there a way to spawn actors on a certain part of a different actor even while it is moving??

Thanks.

Ryusui

  • Posts: 827
The easy way to do it would be to create an Actor attribute for the boss's behavior and set it to your laser actor upon its creation/appearance (which should be handled by said boss behavior). The boss behavior would then control the movement of the laser actor, and - this is important - it should also handle killing, hiding, or otherwise disabling the laser actor so it can effectively keep track of when the laser is active and should be moved.
In the event of a firestorm, the salad bar will remain open.

LordOfGloom

  • Posts: 2

I've been using the Actor Properties to make the X and Y co-ordinates of my actors visible to anyone in the scene (I'm using it for bouncing light off things), but you could just as easily pass the parent actor to your laser pulse and set the co-ordinates from that.

Having said that the effect you want to achieve is a charging animation (with a laser presumably being fired later) so you may want to make that an animation of the turret itself rather than creating a 'charging' actor, destroying it and then creating a laser actor.