Ok so I am making a warriors game I am having some technical difficulties.
Like I cannot make it impossible for the main charector to walk over water or walk on top of the great oak.
And the biggest problem is it can also walk past obsicals that are not supposed to be gone pas like thorns.
I keep trying to get it to stop but I am still new to programming on scratch so I still just
can not see how to do it.
So if anyone can help I would love to know how the heck I can stop the main cat from walking over the great oak and walking on water like the cats version of jesus.
Oh and if its not too much trouble it would be nice to see the programming blocks if possible.
Offline
I'm not sure if you want the cat to die when touching the water, or to not be allowed to go past it,
so I created one for both, (Pick one):
Great oak: Please specify in more detail
What is happening, what do you want to happen...
For thornes:
I was in a bit of a rush, so it's not the best I could do... If this doesnt help then sorry but this is what I did:
Replace this with your own script but leave in the Broadcasts
EDIT: Click the images to see a better view
Regards,
Ralphjos
Last edited by Ralphjos (2009-10-27 22:00:03)
Offline
Ralphjos did a lot of work explaining the "if touching" method. Just to make sure you understand, this method detects if sprite "cat" (or whatever you call it) is touching sprite "thorns", "water", "oak", etc. But hey, I see you have the project Cube World in your favorites. Download that script and examine how it does collision detection (hint: notice the greyish colored line at the bottom of the players square sprite) It is detecting If (this color) is touching (that color)
There are other methods too. If your game is not a scroller, you could check the players x,y positions, thereby defining square areas they either could not go into or that would trigger some action (ie. if the player enters the water, they drown, etc)
But mainly you need to upload what you have scripted so far so we have a better idea what to suggest for your particular needs. Peace!
Offline