Alright so I'm working on a little toy and I have searched in and out of these forums for a good explanation of vecx and vecy and really haven't found something that relates to my problem. What I am trying to do is when my weapon is fired (it then joins the class) and after the npc is dropped it will move a certain distance in the direction of the player. This is what I currently have in the moving part:
PHP Code:
function onCreated()
{
this.image = "bomb.png";
setshape(1, 32, 32);
if (player.dir = 0)
{
move(-20, 0, 1, 4);
}
}
Also, if I add new if (directions) no matter what the move() parameters are, it still moves to the left (dir 0).
If anyone has some tips on using vecx and vecy for this that would be appreciated.