Do you mean, as in:
Enabling and disabling walkable areas each time you press C in order to make the player stop as he approaches a wall?
If so, yeah I tried that, and yeah it worked. The problem was is that it would also stop oncoming left and right crawling modes too, especially when Trying to implement enabling and disabling walkable areas on both left and right crawl modes got kind of tricky, although its tricky-ness is just really me and my experience with scripting practices, I could assume.

Anyway, what I had originally done was use these walkable areas:
Walkable area 1 is my main walk-around area.
Walkable area 2 is my area that I disable each time he enters crawl mode, and enable again once he is not in crouch mode. This allows me to stop the player once he reaches a wall, in crawl mode. However, this also stops me from crawling left and right.
Walkable area 3 is always enabled, to use as bridge to get to Walkable area 4.
Walkable area 4 is turned on each time I enter crawl. This allows me to crawl through the tunnel. It remains disabled once the game starts.
Anyway, when walkable 2 is disabled while I'm in crawl mode, it stops me from crawling into a wall which is what I want. However, it also stops me from moving left and right also, at places that you would assume you could move.
Code: ags
The part for the down crawl mode would pretty much be exactly the same.
Code: ags
But for this last one, on both right and left crawl modes, I place RestoreWalkableArea(2); so I can allow my character to move LEFT AND RIGHT while near the wall, both when I press C, or move left while in crawl mode.
However, it doesn't work. It might be a little confusing. Someone might be able to point out my faults. Theres most likely something I missed typing out.
Thanks.
Enabling and disabling walkable areas each time you press C in order to make the player stop as he approaches a wall?
If so, yeah I tried that, and yeah it worked. The problem was is that it would also stop oncoming left and right crawling modes too, especially when Trying to implement enabling and disabling walkable areas on both left and right crawl modes got kind of tricky, although its tricky-ness is just really me and my experience with scripting practices, I could assume.

Anyway, what I had originally done was use these walkable areas:
Walkable area 1 is my main walk-around area.
Walkable area 2 is my area that I disable each time he enters crawl mode, and enable again once he is not in crouch mode. This allows me to stop the player once he reaches a wall, in crawl mode. However, this also stops me from crawling left and right.
Walkable area 3 is always enabled, to use as bridge to get to Walkable area 4.
Walkable area 4 is turned on each time I enter crawl. This allows me to crawl through the tunnel. It remains disabled once the game starts.
Anyway, when walkable 2 is disabled while I'm in crawl mode, it stops me from crawling into a wall which is what I want. However, it also stops me from moving left and right also, at places that you would assume you could move.
//THIS CODE IS FOR UP CRAWL MODE
if ((keycode == 'C')
if (cBob.View == STANDING-MODE) {
if (cBob.Loop == FACEUP) {
RemoveWalkableArea(2);
RestoreWalkableArea(4);
cBob.ChangeView(CRAWL-MODE);
}
}
else if (cBob.View == CRAWL-MODE) {
if (cBob.Loop == FACEUP) {
RestoreWalkableArea(2);
RemoveWalkableArea(4);
cBob.ChangeView(STANDING-MODE);
}
}
The part for the down crawl mode would pretty much be exactly the same.
//=============RIGHT ARROW KEY CRAWL===========================
if ((keycode == 'C')
if (cBob.View == STANDING-MODE) {
if (cBob.Loop == FACERIGHT) {
RestoreWalkableArea(2);
RestoreWalkableArea(4);
cBob.ChangeView(CRAWL-MODE);
}
}
else if (cBob.View == CRAWL-MODE) {
if (cBob.Loop == FACERIGHT) {
RestoreWalkableArea(4);
cBob.ChangeView(STANDING-MODE);
}
}
But for this last one, on both right and left crawl modes, I place RestoreWalkableArea(2); so I can allow my character to move LEFT AND RIGHT while near the wall, both when I press C, or move left while in crawl mode.
However, it doesn't work. It might be a little confusing. Someone might be able to point out my faults. Theres most likely something I missed typing out.
Thanks.