OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPfreak on 24 Mar 2005, 06:26:38
-
I am creating a script that allows you to pick up vehicles. I was just wondering and wanting to ask if someone could tell me how to make a rope connection between the cargo and the chinook. And also how to keep the cargo from going trough the ground. Some kind of script that only allows it to go above 10 meters or higher. Sorry I know there are a lot of these kind of scripts but I'm just making it for my self.
-
the 'rope' would be just be an camcreated object, an addon most likely
the scipt would look something like this;
_chopper = _this select 0
_cargoobject = _this select 1
#update
_cargoobject setpos [getpos _chopper select 0,getpos _chopper select 1,(getpos _chopper select 0)-3]
_cargoobject setdir getdir _chopper
~0.01
_height = getpos _chopper select 2
?_height>10:goto "update"
hint "Cargo Dropped"
-
hm that looks like the script to prevent heli from going lower than 10 meters... But that's not exactly what I want. Not wanting it to drop but to prevent it from going lower. You gave me an idea and that helped me work out how to do this. Thanks for your help StonedSoldier! I got something like this now:
I'm going to make a game logic and name it something. Then in a script im going to make it attached in the middle of the chopper and executy a chopper setpos (getpos logicname) action. If this doesnt work I put the logic slightly higher and otherwise maybe make a logic that stops looping in the helicopter below 10 meters and then makes the setpos command for the chopper! Don't worry I'll work it out :D!