Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-13-2008, 01:47 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Hitobjects

I'm currently trying to script a laser beam, in the style of Shoop Da Whoop.

However, hitobjects only hits the player directly in front of me, rather than along the line of reference (the showpoly). I've tried fiddling with the range and the number of times it calls hitobjects() (9.5/8), to no avail.

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
//setani("kirble-dama-shoopdawhoop", NULL);
  
  //sleep(3);

  
for (9.5/4=< 9.5+= (9.5/8)) {
    
    
temp.posi_x player.1.5 vecx(player.dir) * i;
    
temp.posi_y player.vecy(player.dir) * i;
    
    
showpoly(1234, {
                    
player.1.5 vecx(player.dir),
                    
player.vecy(player.dir),
                    
temp.posi_x,
                    
temp.posi_y
                    
}
             );
             
    
hitobjects(0.5temp.posi_xtemp.posi_y);
  }

Does anybody have any ideas on how I'd fix this?
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:13 AM.


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