Thread: Hitobjects
View Single Post
  #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