SetTargetPoint () Update the Y offset
Posted: Tue Feb 03, 2009 2:07 am
Hey all.
This is my first attempt at scripted player stuff. So Please excuse my ignorance.
This may not even work
What Im doing is trying to shoot at a enemy pawn wether the enemy is in front of, higher than or lower than the plawer pawn.
So far I have the pawn realizing who is the new enemy pawn when the cursor is over the new enemy pawn.
Now I need to update the OFF_Set_Y in the SetTargetPoint( );
Or to simplify this ordeal.... I would like the bullet to aim at my mouse cursor. and fire in that direction.
Any Ideas how to do this?
Heres what I have thus far......( updated the new enemy not included )
SHOOT[()
{
AnimationSpeed(SHOOTSPEED);
MatchPlayerAngles();
UpdateTarget();
????? HERE I think------> SetTargetPoint(0,NEED THE UPDATED Y ,360);
if(self.animate_at_end)
{
FireProjectile("Shot","BIP01 R HAND",0,0,0,"PHealth");
PlaySound("deagle.wav");
if(self.lbutton_pressed=false)
{
ANM=StringCopy("Idle");
Animate(ANM);
think="Stand_Idle";
}
}
}]
I may be going about this all wrong in the first place.. if so.... any suggestions on the proper way to tackle this
sorry i forgot... im in 3rd person view
This is my first attempt at scripted player stuff. So Please excuse my ignorance.
This may not even work
What Im doing is trying to shoot at a enemy pawn wether the enemy is in front of, higher than or lower than the plawer pawn.
So far I have the pawn realizing who is the new enemy pawn when the cursor is over the new enemy pawn.
Now I need to update the OFF_Set_Y in the SetTargetPoint( );
Or to simplify this ordeal.... I would like the bullet to aim at my mouse cursor. and fire in that direction.
Any Ideas how to do this?
Heres what I have thus far......( updated the new enemy not included )
SHOOT[()
{
AnimationSpeed(SHOOTSPEED);
MatchPlayerAngles();
UpdateTarget();
????? HERE I think------> SetTargetPoint(0,NEED THE UPDATED Y ,360);
if(self.animate_at_end)
{
FireProjectile("Shot","BIP01 R HAND",0,0,0,"PHealth");
PlaySound("deagle.wav");
if(self.lbutton_pressed=false)
{
ANM=StringCopy("Idle");
Animate(ANM);
think="Stand_Idle";
}
}
}]
I may be going about this all wrong in the first place.. if so.... any suggestions on the proper way to tackle this
sorry i forgot... im in 3rd person view