OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 01 Jan 2006, 17:20:00
-
Hi all,
I've got a building that I have setpos'ed from one place to the other, however I can't seem to raise it up or down.
When I try putting 'building1 setpos [(GetPos this select 0), (GetPos this select 1), 5]' I get an error saying 'building1 setpos [(GetPos this select|#| 0), (GetPos this select 1), 5]': Error getpos: Type Bool, expected object
I don't know if this is the right command, or weither I'm just using it wrong for this
Can anyone help? :P
Thanks
-
Your script line seems to work fine if I put it to the initialization field of the building and replace building1 with this.
But I suspect you are doing this in a script file. And I bet you are not using this correctly... where did you put that code, and what is this?
-
Currently, my script file goes:
building1 setpos getpos building2
deletevehicle building2
building1 setpos [(GetPos this select 0), (GetPos this select 1), 5]
exit
The first two lines work fine, but the building that is put in its place is under the ground, with only its roof showing.
When I tried putting the line in a trigger and activating it, the building was transported to an area on the other side of the map.
-
To raise the building up and down, you will need to do this:
building1 setpos [(GetPos building1 select 0), (GetPos building1 select 1), 5]
-Pilot
-
Hehehehe.........
Try this instead:
bpos = getPos building2
deletevehicle building2
building1 setpos bpos
Planck
-
Thanks guys, got it working ;D