creating a trail, unable to go back.
joelloyd
Member, PRO Posts: 119
Hi. Im after a way to make an actor that leaves a trail, permanent trail that it. Once the trail has been made, you cant go back that way. Would tiles be the solution instead of a trail? thankyou
Comments
This part can be done by spawning an actor with a dot or other image using a timer (e.g. every 0 seconds, spawn actor [dot].
So that's trickier. And it depends how your actor is moving. Can you freely drag the actor around, does it move on a grid, is it moving without user input, etc.? You could spawn invisible square actors as well as dots and use collide behaviors to prevent the actor from going past the invisible actors, for example, but again... it depends on other factors you haven't mentioned.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
We will say the game is basically a maze, the main actor will be centered on the screen and the camera will follow always keeping centered. As for the actor, it is just going to be something like a ball bearing smaller then the width of the maze. I haven't decided how to make the actor move yet though, i don't know what would be best. arrows, or user interaction of the maze by dragging down to go up etc, if that is even possible?
What would you suggest. Any response appreciated greatly.
Thanks
Here's a very rough demo. Arrow keys to move.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thankyou very much!
this is good, is there a way to not go back the way you have come?
thanks
I'm sure you could create rules for that. One thought is to have the dot actor spawn a "wall" actor across the width/height of the maze and have the player actor set to collide with the wall actor.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Would it be possible to make squares that when an actor leaves the the square it is on, an actor is spawned in its place. I tried this but the spawned actor collision would not work once left. Or something like this?
\thankyou
sorry that was bad english. when the main actor overlaps a square in the maze and leaves. The square becomes a solid actor, making it unable to return.
You could try:
When actor collides with [square], change attribute self.touched (boolean) to true.
When attribute self.touched is true
.....When actor collides with [square]
.....[no rules]
.....Otherwise
..........Spawn actor [solid square]
..........Destroy actor
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Will have a try when I finish work, thankyou very much for the replies. Much appreciated
Struggling with what I'm doing here. Can you expand a little. Remember I'm a noob ha!
What might work is for you to create the rules as I've outlined them and post a screenshot (upload it to a file-sharing service first). I can let you know if there's something incorrect at that point.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I'm only testing the method with a couple of coloured actors. Im just wondering about the self.touched part
A boolean attribute holds a true or false value and is false by default. So each actor would start with self.touched false meaning that it hadn't been touched by the moving ("player") actor. When the actor touches a square, you can change self.touched to true. Then in the rule condition I gave above, if self.touched is true and the actor is no longer colliding with the player actor, you would spawn a new "solid square" actor.
Two corrections:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Im baffled ha, tried to place it in with no luck. Please could you give an example to see, with just 2 blocks. Going over the block, leaving and not able to go back over. Would be very much appreciated, this is the only thing holding me back.
thank you very much
Here's a modification to the demo I posted earlier. When the player is moving, a dot is spawned that then spawns a "blocker" actor. It's not perfect, obviously, but it's similar to what I suggested.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
this is good, if i can't figure out the other way ill have to do this. thanks
Does anyone else have any suggestions. Making an actor able to go over another and then once past, can't go back. Thank
Anyone ever know of a way to go over an actor, once past and over, the actor becomes solid? Unable to go back over that actor.
been struggling for a while, any help grateful
Hold on. Let me make you a demo.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Try this. There are notes in the platform that destroys.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Please don't create multiple threads for the same question.
/merged
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Sorry about that tatiang. People generally don't look at a thread once seen previously. Won't happen again.
Thanks Braydon_SFX I'll take a look later on. Thanks for help both!
Bumping a thread (by adding new content or additional questions) raises it to the top of the forums page, so therefore people do see it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thankyou so much both! Using both you examples i changed a little i got what i wanted. Ill post for any future people wanting this.
How to upload file? Iv only had my bloody mac less than a week and don't know it!
Great Forums!
thankyou
s000.tinyupload.com/?file_id=08402690184302819485
For anyone wanting an example !
Thankyou for the responses once again!