OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: frag on 25 Sep 2002, 02:12:29

Title: Simple questions for you good script boy!
Post by: frag on 25 Sep 2002, 02:12:29
Hi guys,

2 questions (didn't find anything with search)...

1. How can I set a unit hostage having his hands behing their head? (I saw some in a resistance mission)

2. How can I light the campfire object?

Thanks!
Title: Re:Simple questions for you good script boy!
Post by: Kaliyuga on 25 Sep 2002, 03:00:57
1)  playmove "FXstandsur"  
 (I'm 90% sure that's the right animation, if not someone will give ya the correct one shortly I'm sure ;) )
used in a looped scroll to keep his hands behind his head  ;)


2) this inflame true    (works for 1.46 and previous, not positive about resistance.. haven't actually lit one, well not a fire at least  ;D   in OFP:R yet ::)  

Title: Re:Simple questions for you good script boy!
Post by: frag on 25 Sep 2002, 07:51:14
Kaliyuga,

the campfire is alright...thanks

About the hostage move, I can't get it done. I even try to remove weapon of the soldier and put it (this setcaptive true)
Title: Re:Simple questions for you good script boy!
Post by: T.S.C.Plage on 25 Sep 2002, 08:53:33
You've to add this SwitchMove "FXStandSurUniv" in a Waypoint (at On Activation) and set the "WP behaviour" to careless...this should work.

I think I read something about to use the PlayMove instead of SwitchMove for Resistance...try yourself.

As mentioned you can also put this in a script and loop it to be sure "to keep his hands behind his head".
Notice you've to name the unit if you use it in a script (name SwitchMove "FXStandSurUniv").

The this inflame true/false works fine in 1.75.

Greetz
Plage
Title: Re:Simple questions for you good script boy!
Post by: lilmat on 25 Sep 2002, 13:43:26
Ok!
You will not need a loop for this switchmove!!!!!!!!!!!!! ::) ;D

unit switchmove "fxstandsurdown"  from standing position.
unit will stay in this particular pose.
                            OR
unit switchmove"fxstandsuruniv"
This one the unit will leave his gun on the ground.

To change back use  switchmove"" or  switchmove"normal"
remember to setcaptive true, or they will shoot.
 ;D ;D
Hope that helps.
P.S.  I know alot about switchmoves, so I could help more
If needed!!! ;D
                                                                                                                 
Title: Re:Simple questions for you good script boy!
Post by: LCD on 25 Sep 2002, 15:18:03
@ lilmat - from wat i remember 2 get unit back 2 normal pos u need 2 use

unitname switchmove "null"

LCD OUT
Title: Re:Simple questions for you good script boy!
Post by: lilmat on 25 Sep 2002, 15:41:49
Hey! LCD I didn't know about this one          "null"
The examples I mentioned come from the bis "bible" ;D ;D ;D
The command ref manual!! And also from the campain
scripts!! 8)
So there you go, we can be sure that these work!! ;D
Hope this has given you more info to go in your flies.!
 8) ;D ;D :cheers: :wave:
Title: Re:Simple questions for you good script boy!
Post by: LCD on 25 Sep 2002, 15:59:04
tanks lilmat  ;D

LCD OUT
Title: Re:Simple questions for you good script boy!
Post by: frag on 25 Sep 2002, 19:42:21
Thanks guy,

I am now able to have the move!!!

But is it normal that a unit with the hand behind his head become invincible.

I can shot like 3 magazines on him ... He is full of blood...but dont fall on the ground  ???
Title: Re:Simple questions for you good script boy!
Post by: LCD on 25 Sep 2002, 19:49:50
he is not invincible he just cannot change position  :o  ;D he is already dead  :o

so make a trig like dat

Code: [Select]
condition : not alive unitname
on activision : unitname switchmove "null"



LCD OUT
Title: Re:Simple questions for you good script boy!
Post by: lilmat on 26 Sep 2002, 12:54:01
Generally what happens with switchmoves is, the unit
is "SWITCHED" to this position. Just like sitting down.
So as LCD has said add the loop and he will fall faster
to the ground then Austin Powers trying to get shagged!!
 ;D ;D ;D
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 28 Sep 2002, 17:16:07
The trigger does not work. Can someone tell me how to make him fall?

Title: Re:Simple questions for you good script boy!
Post by: icarus_uk on 28 Sep 2002, 17:21:37
Did you replace UnitName with the name of the unit you are using?
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 28 Sep 2002, 18:52:05
YA! I'm not that stupid!
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 28 Sep 2002, 22:52:20
Can someone help me here!
I'm dieing! :beat:
Title: Re:Simple questions for you good script boy!
Post by: icarus_uk on 28 Sep 2002, 23:02:27
SwitchMove and PlayMove dont work in the init.  Are you using the command in a WP, script or trigger?
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 28 Sep 2002, 23:15:23
I'm using a WP
Title: Re:Simple questions for you good script boy!
Post by: icarus_uk on 28 Sep 2002, 23:23:51
I dont think its been mentioned, which is odd cause its a critical point.  By any chance if your man in SAFE behaviour?  Because he needs to be.
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 00:09:31
My man is a captive without a weapon. Does it still matter?
Title: Re:Simple questions for you good script boy!
Post by: Kaliyuga on 29 Sep 2002, 00:20:12
 Ahh... it's all coming back to me now.... something about an officer sitting on a toilet wasn't it ?  ::)  I think that you need to replace that "null" with the name of a dying animation....
right Asmodeus ?  ;) ;D
Title: Re:Simple questions for you good script boy!
Post by: icarus_uk on 29 Sep 2002, 00:20:19
Ok do this and exactly this;

Make a man, name him "captive".  In his init put;

RemoveAllWeapons This; This SetCaptive True; This SetBehaviour "CARELESS"

Make him a WP right at his feet and in the activation put;

Catpive SwitchMove "FXStandSurUniv"

Now if that doesnt all work, then theres somthing very wrong, very wrong indeed.
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 00:33:25
unitname SwitchMove "FXStandSurUniv" does not work in the WP. I found out that: this SwitchMove "FXStandSurUniv"
does work in the WP, but he dies in that position. I want him to die the normal way.





P.S what's that toilet thing about?
Title: Re:Simple questions for you good script boy!
Post by: Kaliyuga on 29 Sep 2002, 02:27:26
 so...what you want to do is pretty much what LCD and I said then.....

use a trigger:  
condition : not alive unitname
on activation : unitname switchmove "nameofdyinganimation"

so when he dies, he'll perform the dying animation ;)


 About the whole toilet thing, Asmodeus was making a mission and I had the idea to place an officer sitting on a toilet that you can surprise as you enter the latrine area..... got that working , and then he wouldn't fall off the can when you shot him until we used the above method, that's how I know it works ;)
:toocool:
 


Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 03:07:14
What is the name of the dying animation?




Oh yeah, where's that mission? I really want to see if that really worked out. ;D
Title: Re:Simple questions for you good script boy!
Post by: asmodeus on 29 Sep 2002, 08:09:24
Hey Chrisb1220!

 ;D

I made that mission and it's called Covert Reprisal.   ;D  It's the sequel to Covert Destruction..   ;)

Umm... Neither are available on the net right now..  OFPEC lost Covert Destruction during the big switch (and a few others..   :'()  but I'm going to send them both back in to be reviewed very soon!   ;D

If you wanna check it out, I'll e-mail it to you.   :D

Toilet power!!

Oh yeah.. The animation is in the unofficial command reference... (Don't remember exactly what it was..)  It's a must have for good mission editing!   ;)  

Asmo out.
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 08:18:20
Toilet power!
Anyway, I'll see if I can find it.
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 09:06:53
Ok, I know I am getting really annoying right now but I really need this for a mission. I found the animation it's lyingdying. Now, that trigger condition code LCD told us never worked. :P

Title: Re:Simple questions for you good script boy!
Post by: asmodeus on 29 Sep 2002, 11:21:14
Ok..  I sent you the open source version of Covert Reprisal!  With working toilet assassination and booby traps and all!   ;)  lol
Title: Re:Simple questions for you good script boy!
Post by: LCD on 29 Sep 2002, 13:20:29


[attachment deleted by admin]
Title: Re:Simple questions for you good script boy!
Post by: chrisb1220 on 29 Sep 2002, 16:10:42
:toocool:
:toocool:
Ok, I tried it and it worked. I'm sorry I ever doubted you. ;D
I guess this thread is solved.





Title: Re:Simple questions for you good script boy!
Post by: LCD on 29 Sep 2002, 16:43:55
:toocool:

of course it worked i did it  ::)

u know wat buy me an icecream  ;D

mods dis thread need solvin ;)  ;D
LCD OUT
Title: Re:Simple questions for you good script boy!
Post by: Mike on 30 Sep 2002, 10:50:25
to make him fall when dead make a trigger for each surrendering unit like the following:

Condition:  !alive unitname

On Activation:  unitname switchmove "null"

So when the unit is dead.. it will return to normal effects and fall dead  :cheers:

You could also make the Condition:

getdammage unitname > .5

So when he is half dead hes not standing there taking a few bullets to the knee caps and he will return to normal stance before hes dead..


(doh someone allready answered, I didnt see page 2, 3...)
Title: Re:Simple questions for you good script boy!
Post by: silent1 on 30 Sep 2002, 19:38:08
Just adding something - on the first page you said something about putting the unit's name who is the captive in a script.

    You don't need to do this. Instead, put:

              _Unit = _this select 0

    At the beginning of the script, and then put:

              _Unit switchmove FXStand SurUniv

    Where you want it. Then, in a trigger put:
 
               [captivename] exec "scriptname"

     This is useful in case you want to use the script again, and whether you would like other people to use it, when they will (eventually) unzip your mission!