Obstruction into Exit Game
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
KefkaIIV

My code:

void CollisionOne()
{
if(GetObs(2,11) == 1)
{
exit("Game Over");
}

}


I call it in the proper zone at the location with 255.
Although when my character and an entity touch at that location, the game will not exit nor will the message show up. Any input will be appreciated.

Posted on 2008-03-30 12:08:40

mcgrue

I'm not sure what you're doing here.

So, if you have "CollisionOne" as the script attached to a zone, and you activate that zone in-game, this script will only exit if you have obstruction tile #1 (typically that's the "solid" obstruction tile) at map coordinates 2,11.

To see a more verbose version of this script, try:

void CollisionOne()
{
if( GetObs(2,11) == 1 )
{
exit( "Game Over" );
}
else
{
exit( "There was totally no obstruction at (2,11)." );
}
}


That style of debugging will be more forthcoming. If you dno't exit, you'll know the function is never being called.

Posted on 2008-04-01 00:12:17


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.