Draw a line
baazul
Member Posts: 11
Hello
I have an actor that I am moving on the screen. I want it to leave a line behind when it moves.
So I added the "Spawn Actor"
to my "Move" rule which is
"when all of the following are happening => receives a key press: S is: down"
The actor spawn is a dot but instead of keep spawning it as long as S is down, it spawns only once, each time I put S
How do I make it spawn as long as I push S so it looks like a line ?
Also, if you have a better way to make a line behind the actor, feel free to tell me
Thank you
Comments
Maybe the particle behavior works for your game?
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
I am a total noob so I can be wrong but at a first glance I would say "probably not". I expect to add colision to the line, then another actor which will follow the path of the line.
if the actor is not moving , every 0 seconds , spawn a dot actor
Try this
it did not work as it was spawning the actor whenever the player was not moving. But I added your timer to my moving rules and it starts to look like a line. But there is gap between each actor spawned so it is not a straight line. Any idea to make fill the gap ? Apparenty spawn actor every 0 seconds is not fast enough
I made the actor to move slower so now it looks like a line. Not sure it's the best way to make a line but in terms of graphic. It it working. I will see how well it works with the following features I want to add. thank you for your help everyone
This is true depending on the speed of your actor. Particles work somewhat well but again depending on actor speed:
How fast is your actor moving? You might need to use a loop:
(That should have been "in back" of actor.)
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thank you. My actor was moving at a speed of 300. It is now moving at the speed of 150.