trails/creating actors through script
Posted: Tue Jul 25, 2006 7:59 pm
I'm working on a visually simplistic game as a first game. My main "character" is a simple red dot, tiny enough to basically look like a pixel. I've worked out a control scheme to control the dot's movement by using the xvelocity and yvelocity variables.
What I'm trying to do is add a little spice to the mix. I'm trying to trace the path of my flying dot using clones of the dot itself. Kind of like the game snake, where you control the head but the "body" remains. I haven't decided if I want the body to eventually dissapear and give the illusion of having a definite length, like snake, or if I want the body to remain for the duration of the game, like tron.
The trail on the dot can't be straight lines, because the dot moves in a curvy way rather than along the x and y paths. It's got to be identical dots that simply mark where the dot was a moment ago, and remain on that spot.
So I was thinking I'd just create actors in the path of the main actor I'm controlling, and have the animation be the same image I'm using for my character. Trouble is, I don't know how to spawn actors during runtime as opposed to just creating them in the editor. Any help?
What I'm trying to do is add a little spice to the mix. I'm trying to trace the path of my flying dot using clones of the dot itself. Kind of like the game snake, where you control the head but the "body" remains. I haven't decided if I want the body to eventually dissapear and give the illusion of having a definite length, like snake, or if I want the body to remain for the duration of the game, like tron.
The trail on the dot can't be straight lines, because the dot moves in a curvy way rather than along the x and y paths. It's got to be identical dots that simply mark where the dot was a moment ago, and remain on that spot.
So I was thinking I'd just create actors in the path of the main actor I'm controlling, and have the animation be the same image I'm using for my character. Trouble is, I don't know how to spawn actors during runtime as opposed to just creating them in the editor. Any help?