Thread: Shoots
View Single Post
  #3  
Old 02-11-2009, 05:00 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Chompy View Post
PHP Code:
// Will shoot a projectile in the direction of the player
//#CLIENTSIDE
function onCreated() {
  
temp.startx player.x+vecx(player.dir);
  
temp.starty player.y+vecy(player.dir);
  
temp.startz player.z;
  
temp.angle getangle(vecx(player.dir), vecy(player.dir));
  
temp.zangle 0;
  
temp.power  0;
  
temp.ani "arrow"// projectile ani
  
temp.aniparam0 0;
  
temp.aniparam1 0;
  
// etc
  
shoot(temp.startxtemp.startytemp.startztemp.angletemp.zangletemp.powertemp.anitemp.aniparam0temp.aniparam1); // etc with the aniparams

May I suggest the following changes for the starting position:
PHP Code:
  temp.startx player.1.5 vecx(player.dir);
  
temp.starty player.vecy(player.dir); 
Reply With Quote