Hello, I am still working on the game Steve in Space, and I request help with the main character's collision detector. The main character is a human, thus some techniques will not work. Currently I am using a technique in which when touching color orange (wall color) it will jump back to the position it was before (a variable called positionxdetector and positionydetector varifies this position) and it is very glitchy, he will sometimes get trapped in a wall. Please help.
Thanks in advance,
hydreigon
Offline
Hmm. The problem with using a previous position detection is that I could see it remembering the position you were in when inside the wall. Might be better to use something like if touching orange move -10 steps or whatever.
Offline
Hi! Try this script:
forever if <touching color [orange]> repeat until <not <touching color [orange]>> change [scrollx] by [-1] end end end
Offline
You're going to have to modify my script a little.
Offline
I'll try and use scratchblocks to do it.
forever if <touching color (orange)> if <<previousdirection> = (90)> repeat until <not <touching color (orange)>> change (scrollx) by (3) endYeah, so basically it does it like that for each previous direction (0 and -90)
Offline
Can you please tell me the problem?
Oh wait, I think i've spotted it. Just change the Change Scrollx by 3 to Change Scrollx by -3.
If this is not the problem, I have a question. Can your character go/point in any direction, or just up, down, left and right?
Last edited by SciTecCf (2012-04-29 12:51:31)
Offline