Home   Help Search Login Register  

Author Topic: Crouching  (Read 761 times)

0 Members and 1 Guest are viewing this topic.

Spectaculas

  • Guest
Crouching
« on: 30 May 2004, 14:22:55 »
Finally, I know how to get soldiers crouch (e. g. soldier1 playmove "crouch"). Only problem is soldier1 goes back up after tiny crouch session. So the question is: How can I get soldier1 to stay crouched?
« Last Edit: 30 May 2004, 14:26:53 by Spectaculas »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Crouching
« Reply #1 on: 30 May 2004, 15:28:00 »
You need to reissue the command using a loop of some kind, either a script or a gamelogic with waypoints.     You may need to play with the delay in the loop to get just the right timing.
Plenty of reviewed ArmA missions for you to play

Spectaculas

  • Guest
Re:Crouching
« Reply #2 on: 31 May 2004, 15:29:54 »
In english (or in finnish), Macguba.  ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Crouching
« Reply #3 on: 31 May 2004, 16:28:13 »
Lol sorry ... I'll have to do it in English I'm afraid.

When you issue a playmove to a loon, he does it.   Simple.   You want him to do it again?   OK, then you have to issue the command again.    Also easy.    Want it to look good?  Well in that case you'll have to wait the right length of time between issuing the two commands.   Too quick, and he may not do it the second time.  Too slow, and there will be an annoying gap between the two repititions of the animation.

You want him to do it continuously?    Well in that case you have to issue the command again and again and again .....

So the final answer is this:   we need some kind of looped command, with the right delay, and with some kind of exit command to make him stop.      How would BIS do this?   I dunno, but probably by using a gamelogic and waypoints.

There are other ways of doing it.  For example, you could use a small script.   If you're not familiar with scripts read snYpir's Friendly Intro to Code Snippets and also Johan Gustafsson's Scripting Guide.

This is not a working script, its just a sketch.   You'll have to play with it to make it work.

#crounching animation script sketch

crouchStop=false

#loop
? crouchStop: goto "end"
loon1 playmove "crouch"
~2.8
goto "loop"

#end
loon1 playmove "null"
exit

It may not even work with this animation, as I say you will probably need a bit of experimenting to get what you want.

Hope that all makes sense.
Plenty of reviewed ArmA missions for you to play