First off, Hello.
I got a little proplem with my "Bushrace Event", I tryed to make a NPC which loops a if (condition), but it doesn't seem to work. It's the last part for my Event. So please help.
Nr.1
It checks in a loop if the player uses the gani "swim" but something doesn't seem to work. (*I can't find the failure
, so please help me.)
PHP Code:
function onCreated()
{
setTimer(0.05);
}
function onTimeOut()
{
if (player.ani == "swim,")
{
player.x = 22;
player.y = 12;
}
else
{
setTimer(1);
}
}
Nr.2
Not the same as above, but it also don't work. The proplem is the
if (player.ani..) doesn't work... Without the if (condition) it works perfectly.
PHP Code:
function onCreated()
{
setimg("block.png");
setshape(1,32,32);
drawunderplayer();
this.chat = "Goal";
}
function onPlayerTouchsMe()
{
if (player.ani == "carry,")
{
player.x = 37.5;
player.y = 22;
player.chat = "Winner! (*" @ player.account @ ")";
hide();
}
}
Well, please help me. If it's a noob question I am srry but I can't find something usefull I need here on the forums.
Thanks anyway
NG