About Store Forum Documentation Contact



Post Reply 
Pos Problem eh?
Author Message
Psylixiri Offline
Member

Post: #1
Pos Problem eh?
i've trying to import the shooting script from bloody massacre so like i try to
put it in the "player.cpp"
but intellisense doesn't detect "set" function so i put it in "chr.cpp" and so it's detecting the function in it. so when i click
nothing is draw beside the attackLeftHand animation. =/
//************Bullets.h******************\\
Reference<Chr> owner;
//*************Player.cpp****************\\
if(Ms.b(0))attackLeftHand();
//*************Chr.cpp******************\\
void Chr::attackLeftHand()

Bullet &bullet=Bullets.New();
C Vec &dir =cskel.getPoint("head").dir;
Vec pos =ctrl_pos()+dir*0.2f;
bullet.set(pos, dir, this);
//****************Bullet.cpp********************\\
void Bullet::set(C Vec &pos, C Vec &dir, Chr *owner)
{
T.matrix.setPosDir(pos,dir);
T.vel =dir*50;
T.owner=owner;
}
//************************************\\
(This post was last modified: 11-09-2011 10:22 PM by Psylixiri.)
11-09-2011 10:20 PM
Find all posts by this user Quote this message in a reply
Post Reply