Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-18-2011, 06:43 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Vecx, Vecy and move()

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(13232);

  if (
player.dir 0)
  {
    
move(-20014);
  }

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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.