I'm having a problem with a piece of coding (may possibly be brushes in the map?) I've been trying to figure this out all afternoon with no success.
My collider call action is:
type - dynamic
id - 2002
material - air
draw - mat
class - action
This seems to work fine...
my block brush is:
type - static
id - 2003
material - block
draw - mat
collider - none
class - none
this seems to work fine too
the platform that is supposed to appear after using the correct object:
type - static
id - 2005
material - block
draw - mat
disable - yes (as it's only supposed to appear after the right item is used
class - none
I am getting an error message when I use the correct item to make the platform appear. Brushes 2002 and 2003 are supposed to be disabled
Can someone take a look at the coding please and tell me where I've gone wrong (either with the coding or the brushes).
//broken bridge
func CollideObject_2002_1()
{
Message1(3,3,"THE BRIDGE ISnBROKEN. I CAN'TnGET ACROSS.");
MessagePop();
}
// fix bridge
func UseObject_2002( idx )
{
if(idx==ObjFind(120))
{
Message0(3,8,"DIZZY USES THEnBRIDGE REPAIRnKIT TO FIXnTHE BRIDGE.");
MessagePop();
InventorySub(idx);
ObjSet(ObjFind(2002),O_DISABLE,1);
ObjSet(ObjFind(2003),O_DISABLE,1);
ObjSet(ObjFind(2005),O_DISABLE,0);
return;
}
else
{
Message1(3,8,"THAT WON'T WORK.");
MessagePop();
}
}