Home   Help Search Login Register  

Author Topic: crouch action?  (Read 1186 times)

0 Members and 2 Guests are viewing this topic.

Offline beefholishness

  • Members
  • *
  • I'm a llama!
crouch action?
« on: 08 Jan 2006, 07:19:28 »
With a search of the forums I found how to make a trigger that will make a specific unit crouch, but I need to make a large group crouch.  I only found one crouch action on the lists here, and it dosn't appear to work.  Is there an init line that will make a unit crouch? (hence easy to copy and paste)
don't take the name the wrong way

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:crouch action?
« Reply #1 on: 08 Jan 2006, 08:04:00 »
I have created a script even though it is probably not exactly what your looking for it may help.

http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=24748

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:crouch action?
« Reply #2 on: 08 Jan 2006, 09:35:38 »
I dunno what Penguinman's script looks like but usually it's done by a fast loop. I'd be wary of such a thing if I were you as a lot of guys crouching in a fast loop will eat up fps.

I reckon anyway.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:crouch action?
« Reply #3 on: 08 Jan 2006, 11:06:08 »
Playmove and switchmove do not always work if they are in the unit's init field.  It is better to have a small delay after the start of the mission before actioning them.  Also some of the moves only work for a limited time after which the unit goes back its default setting - you need to experiment with this.

To do something for a large number of units that you can do for one unit try this:

{instruction1 _x;_x instruction2;etc...} forEach (units group1name   + units group2name + etc)

This will result in the following being done
instruction1 unitname
unitname instruction2
etc...

for all units in group1name + group2name + etc.


instruction1 might be something like unassignVehicle
instruction2 might be something liek setPos ...
« Last Edit: 08 Jan 2006, 11:08:41 by THobson »

Offline beefholishness

  • Members
  • *
  • I'm a llama!
Re:crouch action?
« Reply #4 on: 11 Jan 2006, 21:16:28 »
So essentially, there is no 100% effective init line that will just make a unit crouch and keep him there.
don't take the name the wrong way

Offline 456820

  • Contributing Member
  • **
Re:crouch action?
« Reply #5 on: 11 Jan 2006, 21:20:18 »
i think this is in the FAQ cant remember but im sure it is
But what they said never 100% worked they will stay where they are but once they stand up they will stay stood up but still wont move but them standing only happens rarely

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:crouch action?
« Reply #6 on: 11 Jan 2006, 23:32:12 »
Quote
there is no 100% effective init line that will just make a unit crouch and keep him there.
Correct.   Moreover, there is no 100% effective init line that will make him crouch at all.
Plenty of reviewed ArmA missions for you to play

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:crouch action?
« Reply #7 on: 12 Jan 2006, 01:04:25 »
no, my script dosent use a loop, and the units all stay crouched, and can shoot. you should check it out.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:crouch action?
« Reply #8 on: 12 Jan 2006, 23:47:40 »
You can make a unit freeze in the crouching position by using the following code on him:

Code: [Select]
loon1 setUnitPos "UP"
loon1 setBehaviour "Combat"
loon1 switchMove "Crouch"
loon1 disableAI "Move"

He will not stand up if he is firing, etc, but be warned that he cannot move from that position. Otherwise, execute everything but the disableAI command on him. Unfortunatly, he will generally stand up when he sees the enemy, but he can move. You could also try a doStop command, which might prevent him from standing.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline beefholishness

  • Members
  • *
  • I'm a llama!
Re:crouch action?
« Reply #9 on: 13 Jan 2006, 05:47:10 »
Thanks guys, I'll try everything suggested... I just got done a complete reinstall of XP today so it may be a while before I'm back to editing anyway.  I'm making civil war engagements, so not being able to move is actually beneficial. ;)
don't take the name the wrong way

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:crouch action?
« Reply #10 on: 13 Jan 2006, 08:44:44 »
or you can use an Anim addon that has crouching and aiming addons in, ICP Orcs Anims or Wilco's anims are both good ones
"If I remain lost and die on a cross, atleast I wasn't born in a manger"