OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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?
-
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.
-
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:
_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 +
-
Well...
...Your way is better! :-[
-
Whos why mine or CPT Crunch?
-
Sorry dude I got you now, well there is always more than one way to skin a cat.
-
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 ;)