Home   Help Search Login Register  

Author Topic: question about ropes with lifting vehicles  (Read 622 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
question about ropes with lifting vehicles
« 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.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

StonedSoldier

  • Guest
Re:question about ropes with lifting vehicles
« Reply #1 on: 24 Mar 2005, 10:11:57 »
the 'rope' would be just be an camcreated object, an addon most likely

the scipt would look something like this;

Code: [Select]
_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"

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:question about ropes with lifting vehicles
« Reply #2 on: 25 Mar 2005, 01:15:54 »
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!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage