Hi m8's
I've got this question
How can i spawn an allies airborn that if an allies is standing in front of him he will salute
and if an axis is coming close it will start shooting ?
Greetz DigitaC
AI question 2
Moderator: Moderators
I did?digitac wrote:and pls why did u blocked me on msn ?
Well anyway you need some code to check continuously if an Allied AI/player is near your saluting guy, then if so, turn to him and do the saluting animation... that is only if he's not yet attacking someone
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
while (1)
{
for (local.i=1;local.i<=$player.size;local.i++)
{
if !($player[local.i].saluted = 1)
{
if ($blokey can see $player[local.i] 360 256)
{
$blokey turnto $player[local.i]
wait .75
$blokey anim salute //you'll need to check the anim name
iprintln_noloc "saluting"
$player[local.i].saluted = 1
$blokey waittill animdone
}
}
}
wait 2
}
{
for (local.i=1;local.i<=$player.size;local.i++)
{
if !($player[local.i].saluted = 1)
{
if ($blokey can see $player[local.i] 360 256)
{
$blokey turnto $player[local.i]
wait .75
$blokey anim salute //you'll need to check the anim name
iprintln_noloc "saluting"
$player[local.i].saluted = 1
$blokey waittill animdone
}
}
}
wait 2
}
hope this helps, prob not cos it's all foreign 2 me :-/
