OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: armybikos on 06 Jun 2003, 18:42:32

Title: Making Triple Strand Concertina Wire
Post by: armybikos on 06 Jun 2003, 18:42:32
I am trying to make triple strand concertina wire, the problem is adding a 3rd roll of wire on top of the two rolls on the ground. I know you can use ite SetPos command to make an object appear anywhere but that would be a bitch when making a whole defensive obstacle. Is there any way to just change the Z variable or height of an object?
Title: Re:Making Triple Strand Concertina Wire
Post by: armybikos on 06 Jun 2003, 18:49:11
hey I found the answer to my own question in the init line it is
this setpos[(getpos this select 0),(getpos this select 1),3];
this sets the x and y variable to nothing and you can change the Z or height to however many meter above the ground you want. If anybody else wants to know a quick way to do triple strand concertina make one two rolls parellel to each other on the ground and then have one roll on top inbetween the other two using the command. then you can just copy and pase to make your obstacle.
Title: Re:Making Triple Strand Concertina Wire
Post by: Captain Crunch on 06 Jun 2003, 18:55:28
Here's what should be a simple and quick way to achieve this: (well as far as I know anyway!)

In the "Init" field of each of the item You want to float over the others, type:


[This] Exec "GravitySucks.sqs"


And thats what the "GravitySucks.sqs" script should look like:


Code: [Select]
_Obj = _This Select 0


_X = (GetPos _Obj) Select 0
_Y = (GetPos _Obj) Select 1
_Z = (GetPos _Obj) Select 2

_Obj SetPos [_X, _Y, _Z + 1]

Exit

;)

PS: You can adjust the height with the number after the +
Title: Re:Making Triple Strand Concertina Wire
Post by: Captain Crunch on 06 Jun 2003, 18:58:30
Well...


   ...Your way is better! :-[
Title: Re:Making Triple Strand Concertina Wire
Post by: armybikos on 06 Jun 2003, 19:08:34
Whos why mine or CPT Crunch?
Title: Re:Making Triple Strand Concertina Wire
Post by: armybikos on 06 Jun 2003, 19:10:04
Sorry dude I got you now, well there is always more than one way to skin a cat.
Title: Re:Making Triple Strand Concertina Wire
Post by: Sui on 07 Jun 2003, 07:42:12
Welcome to the forums, armybikos :)

If your problem has been solved, could I ask that you please use the "Solved" button (down the bottom of the thread).

This means we can add the question/answer to the Editor's FAQ. Thanks ;)