Home   Help Search Login Register  

Author Topic: crouching?  (Read 1127 times)

0 Members and 2 Guests are viewing this topic.

SnakeFart

  • Guest
crouching?
« on: 11 Apr 2003, 19:47:26 »
i need to make an ai soilder crouch so he can try to hold a house from incoming forces how do i tell him to crouch...

this "effectstandcrouch"     doesnt seem to work

(init fields needed..dont know scripting with notepad yet :( )

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:crouching?
« Reply #1 on: 11 Apr 2003, 20:03:47 »
this switchmove "effectstandcrouch"

or playmove.

You may find that the loon won't stay down, however.  

You'll find a full listing of switchmove/playmove animations in the Ed Depot, in Pending.

If you're writing stuff in init fields, that's scripting.   :)   Read Abuu's Basic editing tutorial followed by Johan Gustafsson's Scripting guide.   And of course snYpir's Friendly introduction to code snippets.
Plenty of reviewed ArmA missions for you to play

SnakeFart

  • Guest
Re:crouching?
« Reply #2 on: 11 Apr 2003, 20:07:10 »
ahh switchmove roger that..but i dont understand the format of scripting with notepad...thats my only issue

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:crouching?
« Reply #3 on: 11 Apr 2003, 20:10:11 »
There is no format ... you just write the same kind of stuff as you would in the init field.
Plenty of reviewed ArmA missions for you to play

Gameer_77

  • Guest
Re:crouching?
« Reply #4 on: 11 Apr 2003, 20:22:03 »
Animations don't work in init fields. You need to use triggers (Or scripts, which you don't like ;D)

For the whole crouch thing, the soldier must be made in setunitpos "up", he must be in combat mode and must be stopped.

If you make a script named crouch.txt (or .sqs, but it doesn't actually matter) then in it put:

Code: [Select]
_croucher=_this select 0

_croucher setunitpos "up"
_croucher setbehaviour "combat"
_croucher switchmove "Crouch"
_croucher stop true

Then in the unit's init field put [this] exec "crouch.txt" (Or "crouch.sqs" if you made it a .sqs) and it should work. It should work ;) :P

Gameer
« Last Edit: 11 Apr 2003, 20:29:44 by Gameer »

JerryK_387

  • Guest
Re:crouching?
« Reply #5 on: 12 Apr 2003, 20:36:33 »
Ok... I was just wondering how to use loops and stuff like that to keep the guy crouched... cuz I would like to keep a guy behind some sandbags, but it's pointless when he's standing up, and won't fire from behind it laying down.... anybody want to write the script for me please :) :)  ;D

_DaRkMaN_

  • Guest
Re:crouching?
« Reply #6 on: 12 Apr 2003, 20:46:39 »
doesnt
aP setUnitPos "DOWN"
work

Flapje

  • Guest
Re:crouching?
« Reply #7 on: 12 Apr 2003, 21:14:24 »
about scripting in notepad: if you want to do i.e. switchmoves in a script, you just do this:

bla switchmove bla

bla2 switchmove bla

END

that's it, you wrote yourself a script ;) mayb add some time or anything, but you get the idea?

ps: this makes dude bla and bla2 do something when the script activates
« Last Edit: 12 Apr 2003, 21:19:00 by Flapje »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:crouching?
« Reply #8 on: 12 Apr 2003, 22:05:42 »

...If you make a script ...then ...put:

Code: [Select]
_croucher=_this select 0

_croucher setunitpos "up"
_croucher setbehaviour "combat"
_croucher switchmove "Crouch"
_croucher stop true


Gameer


==================

 Just a detail here:  

         "_croucher stop true"

- is not a perfect way to make a d00d hold, as it will sort of freeze the moron  ::)
Ya might wanna try "DoStop _croucher" instead if ya want him to stand still and yet be able to shoot when attacked.  :) Now, to make a guy crouch the easy way, I'd try som'n like the crap below:

Create the moron, put a WayPoint next to him & slide it upon his head.
Then set the behaviour to "STEALTH" in the WP window and put this lot in the "On Activ." field :

 This setUnitPos "UP"; this switchmove "crouch"; DoStop This  :-*


That'll tell Bob to get on his knee and stay there!
PS - be sure to remove all handgrenades, as he might get up on his feet again
if he suddenly feels like throwing eggs at the enemy!  :P ::) ;D


CYA

=========

PS. Oh, and just in case! To remove all handgrenades, put

  This RemoveMagazines "HandGrenade"

 in the guy's INIT field.  :-*


« Last Edit: 12 Apr 2003, 22:10:56 by Tomb »

Gameer_77

  • Guest
Re:crouching?
« Reply #9 on: 13 Apr 2003, 00:48:14 »
 ::)

Whateva! :P

Gameer
« Last Edit: 13 Apr 2003, 00:51:16 by Gameer »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:crouching?
« Reply #10 on: 13 Apr 2003, 15:12:00 »
now that we talk crouching, I'm not even sure if the "doStop" is nessesary at all
as any crouched (via switchMove) d00d tend to stop/freeze by default, though he WILL fire.


mm. aah, well... gah! nuff 'z' nuff  ::) Tomb crouched.


(should of been my ol' lady!)

Gameer_77

  • Guest
Re:crouching?
« Reply #11 on: 13 Apr 2003, 20:17:40 »
Aye? :-X

I think they end up standing up to fire on them when you un-stop them.

Gameer

KottE

  • Guest
Re:crouching?
« Reply #12 on: 19 May 2003, 19:12:26 »
that switchmove thing never works for me!
watts wrong !?!?!?
 ??? :o >:( :'( :-\ :-[

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:crouching?
« Reply #13 on: 19 May 2003, 20:53:39 »
mebe try loopin da switchmove commend ;)

#loop
unitname switchmove "Crouch"
~1
goto "loop"

i cant c snakefart sain dat it works - nd it didnt work 4 me also ::) (till i looped it ;D)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Dandy

  • Members
  • *
  • my teatcher say that there is 80% water in water
Re:crouching?
« Reply #14 on: 19 May 2003, 23:57:11 »
Put this in the init of the soldier:

this setBehaviour "combat";this setUnitPos "up";this switchMove "combattocrouch"

It works. Yes it does 8)

Remember me: Dandy
« Last Edit: 20 May 2003, 00:03:20 by Dandy »
Is there a question about monkeys? okay I gues not!