Hi guys,
I've got a question. I'm making an SP mod where I want to see an Allied ( targetname = allies1) sitting when I walk up to him . I'm using one of the M1|1 animation for in the truck After the animation stops he stands up and goes into idle.
Basically the script in my map.scr is this
thread sit_down
sit_down:
// there should be some sort of loop or condition here??
$allies1 anim truck_idle_guy01
// end of loop
end
The same effect is when in mOHRadiant and press ' N' it's also sets the animation but again only once...
How do I keep this animation repeating??
I tried both a while(isalive $player) and while(1) but they don't work MOH.
The M1|1.scr doesn't give me a clue either cause they doing a clause while truck is driving.
Anybody referring me to the cardgame tutorial please post the url as well cause I couldn't find it...
Thanx a lot
Animation AI
Moderator: Moderators
You can try:
$allies1 animloop truck_idle_guy01
Or use a looped animation. There are animations specifically made for your purpose. You can use any of the following aliases:
lean_chair_legs
lean_sitwall_legs
lean_standwall_legs
getup_chairtostand
getup_sitwalltostand
getup_standwalltostand
relax01
relax02
relaxtosleep
sleep01
sleep02
sleeptorelax
sleeptorelax_surprise
The bold animations are looped ones. You can for example just type:
$allies1 anim lean_sitwall_legs
All these animations are in models/human/animation/scripted/lean.tik.
You need to include that TIKI or to prefix your map name with 'test'.
$allies1 animloop truck_idle_guy01
Or use a looped animation. There are animations specifically made for your purpose. You can use any of the following aliases:
lean_chair_legs
lean_sitwall_legs
lean_standwall_legs
getup_chairtostand
getup_sitwalltostand
getup_standwalltostand
relax01
relax02
relaxtosleep
sleep01
sleep02
sleeptorelax
sleeptorelax_surprise
The bold animations are looped ones. You can for example just type:
$allies1 anim lean_sitwall_legs
All these animations are in models/human/animation/scripted/lean.tik.
You need to include that TIKI or to prefix your map name with 'test'.
-
Guest
Thanx handy to know but still I'ld like to know how an animation be repeated??
$allies1 animloop truck_idle_guy01 does play the animation but again only once....
The relax01 and other loops do work but that's the same as going into idle mode.
BTW EA is not very consistent in the naming of their SKC. The relax01 is named as scripted/lean/relax01(loop) where
relaxtosleep is named as scripted/lean/relaxtosleep.skc
Another thing is that these loops are all upper body animations. Does this mean that if the entitie is in crouch mode this animation can also be performed while still in crouch mode ??
$allies1 animloop truck_idle_guy01 does play the animation but again only once....
The relax01 and other loops do work but that's the same as going into idle mode.
BTW EA is not very consistent in the naming of their SKC. The relax01 is named as scripted/lean/relax01(loop) where
relaxtosleep is named as scripted/lean/relaxtosleep.skc
Another thing is that these loops are all upper body animations. Does this mean that if the entitie is in crouch mode this animation can also be performed while still in crouch mode ??
Looping animations
I think you can loop animations with the following piece of script code:
About the upper body animations, yes I think you can also use them when the AI is crouched or squatted down. Might look silly though.
Anywee, goed luk ermee
.
Code: Select all
$allies1 thread idlesit
idlesit:
while(isAlive self)
{
self anim truck_idle_guy01
self waittill animdone
}
end
Anywee, goed luk ermee
-
Guest
We've got a winner!!!
Strange that my attempt with Isalive didn't work.
I improved it a bit so and added the animation as a parameter so that it's better suited for general use.
$allies1 thread loop_anim truck_idle_guy01
loop_anim local.anim:
while(isAlive self)
{
self anim local.anim
self waittill animdone
}
end
If there's a sequence of different of animations we can make either an array or add more variables to it. Personally an array is more flexibele but a bit more cumbersome for the not scripters.
Strange that my attempt with Isalive didn't work.
I improved it a bit so and added the animation as a parameter so that it's better suited for general use.
$allies1 thread loop_anim truck_idle_guy01
loop_anim local.anim:
while(isAlive self)
{
self anim local.anim
self waittill animdone
}
end
If there's a sequence of different of animations we can make either an array or add more variables to it. Personally an array is more flexibele but a bit more cumbersome for the not scripters.
-
Guest
Just tried the upper body animation but no luck
He stands up again at the relax01. Apparently the comment
' // Relaxing (upper body animations) '
in the .tik file has nothing to with the ability to control the upper body , just which part is moving as a reminder:(
Bedankt voor de hulp
Code: Select all
$allies1 exec global/crouch.scr // get's into crouching
$allies1 anim relax01 ' // Relaxing (upper body animations) '
in the .tik file has nothing to with the ability to control the upper body , just which part is moving as a reminder:(
Bedankt voor de hulp