Hi again,
I'm experimenting with different things my character can walk on. I thought quicksand would be interesting. I've scripted it so that the character's movement is much slower than on ordinary ground, but I'm unsure how to get the quicksand to "suck in" the character, like in Super Mario Bros. DS or Wii.
Would anyone be so kind as to suggest anything?
Offline
You could try something like:
[forever]
[][if <touching color [ ]?>]
[][][set y to [-1]]
[][else]
[][][set y to [0]]
[][end if else]
[end forever]
Offline
Jonathanpb wrote:
You could try something like:
[forever]
[][if <touching color [ ]?>]
[][][set y to [-1]]
[][else]
[][][set y to [0]]
[][end if else]
[end forever]
I think you mean [change y by [-1]].
Offline
Do you mean the colour is the colour of the quicksand?
I tried it with if the character was touching the quicksand then change y to minus 1, else change y by 0, but the character wouldn't move left or right and ended up standing below the ground line.
Offline
AtomicBawm3 wrote:
Jonathanpb wrote:
You could try something like:
[forever]
[][if <touching color [ ]?>]
[][][set y to [-1]]
[][else]
[][][set y to [0]]
[][end if else]
[end forever]I think you mean [change y by [-1]].
The character would sink and sink and sink as long as long as it were touching the color. I though the quicksand was just supposed to sink you in a little bit
the_storm_of_stone wrote:
Do you mean the colour is the colour of the quicksand?
I tried it with if the character was touching the quicksand then change y to minus 1, else change y by 0, but the character wouldn't move left or right and ended up standing below the ground line.
Yeah, the color of the quicksand.
Uh... I thought you wanted the character to sink in a little bit - doesn't it do that?
I don't see how your character would not be able to move... maybe you have a [forever] or [forever if < >] block in the same script as the movement part?
Offline
Yeah, I wanted the character to get sucked down completely while still being able to move left and right, but still be able to jump out of it.
Could you please describe the inclusion of the forever or forever if more clearly? I'm not particularly skilled at programming, so I'm afraid you'll have to explain as clearly as you can.... Sorry
Offline
Okay, but how do I stop him going below the grounds surface when I get out of it?
Offline