I have a stick figure fighting game I’m currently working on. I’ve animated the moves and the walking, ect. But now I wanna make it so the players can only stand on one mc, GameArea.
I tried the script that came with part of the tutorial, but nothing happen:
//
// getBoundLeft(), getBoundRight(), getBoundTop(), getBoundBottom() returns bound
//
// returns the boundry to the game area
//
function getBoundLeft()
{
return GameArea._x;
}
function getBoundRight()
{
return GameArea._x+GameArea._width;
}
function getBoundTop()
{
return GameArea._y;
}
function getBoundBottom()
{
return GameArea._y+GameArea._height;
}
If this way isn’t a possible, then I’d just like to limit the players on how high/low they can move.
Anyone with any insight would be GREATLY appreciated.
Thanks in advanced,
KoRRupt
[edit]Jubba: Just to make the code easier to read[/edit]
Those functions return a value. They aren’t supposed to limit anything. What you would do is call the variable in an IF statement check to see the position of the fighter: