Author Topic: setMove* Event  (Read 614 times)

Im making a event for bots to make them move, would this work?
Code: [Select]
registerOutputEvent("Bot", "MoveX", 1);

function Bot::setMoveX(%bot,%X)
{
parent::setMoveX(%bot, %x);
setMoveX(%X);
}

registerOutputEvent("Bot", "MoveY", 1);

function Bot::setMoveY(%bot,%Y)
{
parent::setMoveY(%bot, %Y);
setMoveY(%Y);
}

registerOutputEvent("Bot", "MoveZ", 1);

function Bot::setMoveX(%bot,%Z)
{
parent::setMoveX(%bot, %Z);
setMoveX(%Z);
}

No it doesn't work.
I don't know what the hell you're doing with that code.

No it doesn't work.
I don't know what the hell you're doing with that code.
I was basing it off the AddItem, i am trying to make a bot Move X,Y, or Z

Bot's position: 1 0 0
X(5): 6 0 0
or
x(5): 5 0 0

Is it supposed to move it to the corresponding x value, or is it supposed to increment/decrement the x by that value.

It makes them move to X if 1 or -X if -1
Its from the Ai script i got.

That code doesn't make sense...

I see what i did wrong...