Home   Help Search Login Register  

Author Topic: trailer script  (Read 2374 times)

0 Members and 2 Guests are viewing this topic.

swift88

  • Guest
trailer script
« on: 29 Aug 2003, 17:17:59 »
could some-one help me with a trailer script please......... i would be very grateful

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:trailer script
« Reply #1 on: 29 Aug 2003, 23:32:10 »
would a simple setpos getpos command work using a relpos, something similar to the way choppers undersling vehicles. Maybe you could de pbo that addon to see how they did it

or would it be more complicated and you would have to do velocity and direction maths for the towing vehicles
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

swift88

  • Guest
Re:trailer script
« Reply #2 on: 30 Aug 2003, 12:32:30 »
what the problem is that im hoping to remove the trailer when the user doesnt want........... with just the cab seperate from the trailer itself

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:trailer script
« Reply #3 on: 30 Aug 2003, 16:13:22 »
from my recollections, the trailer kneck doesnt look right

the trailer would be disconnected using an addaction
Mightbe better to approach the problem as 2 addons in the same pbo and try to figure out how to attach them, that way disconnecting them would be easy. If you can figure it out then this leaves the door open for towed artillery etc.


How do the jet  addons attach their bombs and release them

perhaps have the trailer classed as a weapon and then have the tractor unit add a weapon to itself

This stuffs  new to me am just trying to give u ideas, addons is something i have never messed with


another option perhaps, is to have 3 addons in the same pbo and then instead of trying to split or merge the tractor and trailer, the addaction instead deletes the tractor trailer combined and creates a new independant tractor and trailer unit and vice versa

so your addons would be
Tractor-trailer joined together
Tractor unit
Trailer unit

addaction "Unhitch" deletes the combined tractor trailer and replaces it with seperate units
addaction "Hitch" deletes the independants and creates new vehicle tractor trailer combined
« Last Edit: 30 Aug 2003, 16:24:35 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

swift88

  • Guest
Re:trailer script
« Reply #4 on: 31 Aug 2003, 23:59:44 »
cheers mate back to the drawing board

BraTTy

  • Guest
Re:trailer script
« Reply #5 on: 01 Sep 2003, 19:22:33 »
Have you looked at the towable WW2 Pak that was made by WW2EC?
Your welcome to use my scripts from that,however I don't own the vehicle

swift88

  • Guest
Re:trailer script
« Reply #6 on: 02 Sep 2003, 00:21:01 »
thanks......is that a sqs file, because i was told about that from some-one

BraTTy

  • Guest
Re:trailer script
« Reply #7 on: 04 Sep 2003, 01:26:50 »
Yes its called towing.sqs and its within the addon

Muts

  • Guest
Re:trailer script
« Reply #8 on: 27 Sep 2003, 22:55:40 »
Hi

After driving aroud all saturday in my mom's car with a trailer behind it and seeing many other people spending that saturday in the same manner, I felt like making a trailer addon for flashpoint. So first I went to the ofpec forums to see if anyone already had some idea's on how to do it. that's how i found this thread.

Now I have not been able to find the PAK addon on the WWIIEC site, so can you perhaps provide me with a link to the addon? (I did find a script snippet on towing though, but it doesn't really behave like a trailer does)

I hereby also post the trailertowing-script I made today for you to comment on and/or perhaps help me fix what doesn't yet work.(I'm trying to make the towing part work first, extras such as hitching and unhitching can be added later)
Sofar it will only work when the trailer is an object that doesn't adjust to the terrain such as the armoured target or a chair, any other kind of object will slide from side to side(vehicles) or sort of orbit around the towing vehicle(very strange effect).

well..just tell me what you think of it.....



Muts

  • Guest
Re:trailer script
« Reply #9 on: 27 Sep 2003, 23:00:10 »
hmm the zip file didn't come along right

Offline KJAM

  • Contributing Member
  • **
  • Why Me, Whats it For?
    • Nightstalker mod
Re:trailer script
« Reply #10 on: 28 Sep 2003, 14:58:20 »
Muts........dude your script is sweet ;D

Quote
Sofar it will only work when the trailer is an object that doesn't adjust to the terrain such as the armoured target or a chair, any other kind of object will slide from side to side(vehicles) or sort of orbit around the towing vehicle(very strange effect).

ive tried this out with M1a1's M113's a civilian motorcycle and even an A-10 by replacing the armoured target you put in the mission, and also changed the jeep to a 5t truck, although each one does need a little tweaking with the distance
the tricgger loooks something liek this at the start of it
[car,-2,trailer,6,-5]  
 in that im guessing that the number 6 is the towing distance and even though they do slide a little bit, to me it looks more realistic and they dont slide around to bad but it still looks a litle wierd because there is nothing holding the towed object to the one thats towing it, hell i just had a crazy idea on how this could be implemented to make like a long line of things towed, or even (although ill have tot ry it) a convoy ;D with no changes to the script itself lol

Muts

  • Guest
Re:trailer script
« Reply #11 on: 28 Sep 2003, 16:22:48 »
Hi

Here's the script again in a somewhat improved version, the objects now do not orbit around the vehicle while standing still, since the script now only runs while the towing vehicle is moving.

Also I've added a readme file with a schematic drawing and explanation of the values used in the script

best regards, Muts

Muts

  • Guest
Re:trailer script
« Reply #12 on: 28 Sep 2003, 20:46:25 »
well here I am again,

I guess I posted my improved script and readmefile a bit to eagerly, (I mean someone did think the script was sweet you know ::)) because it had a few flaws in it.
So now I had to make the improved improved version, hoping I thought it over a bit better.  The script itself is still not finished , but that's what the forum's for , right?

Well anyway the explanation to the script values is a bit clearer now, see for yourself in version 1.11 of the script and readme file.

swift88

  • Guest
Re:trailer script
« Reply #13 on: 02 Oct 2003, 11:28:35 »
looks gud mate

Offline Blanco

  • Former Staff
  • ****
Re:trailer script
« Reply #14 on: 02 Oct 2003, 20:30:50 »
well, it's a nice script, a good alternative to the WW2 Pak if you don't want the addon in your mission.

I use the script in a cutscene where a UAZ's  towing a cessna to the runway. It looks great, I set the UAZ's speed to limited.
I had to do some nifty camerawork, otherwise the player would see there's no boom (hmm, is that a word?!)... :)

but anyways....  :thumbsup:


Search or search or search before you ask.

Muts

  • Guest
Re:trailer script
« Reply #15 on: 03 Oct 2003, 00:38:27 »
Hi guys,

Good news, I managed to evade the problem with the sliding and orbiting objects,
the script now uses a helper-object to provide the x- and y- coordinates of the trailer.
also I added the possibility to point the trailer in any direction (in relation to the car ) you want (for whatever reason you want)

now I only need to put some actions in the script, too bad AddAction doesn't allow local variables to be passed on to other scripts, so I will have to work my way around this.

Regards, Muts

P.S. can anyone point me to the WWIIEC towable PAK addon, cause I still haven't found it. I dit find GST_Pak36, but it isn't towable

P.P.S. to Blanco, by boom I mean pole (disselBOOM in Dutch);)

Offline Blanco

  • Former Staff
  • ****
Re:trailer script
« Reply #16 on: 03 Oct 2003, 18:43:39 »
What can I say? Very nice!

Btw, how do you know I speak Dutch?

***edit***

here you go - ftp://www.gamezone.cz/ofpd/unofaddons2/EC_Pak36krupp.rar


« Last Edit: 03 Oct 2003, 19:07:51 by Blanco »
Search or search or search before you ask.

BraTTy

  • Guest
Re:trailer script
« Reply #17 on: 04 Oct 2003, 23:51:22 »
That is the correct link for the towable Pak36, drive either the Krupp Protze WW2 Truck (also included with the Pak) or a BMP near the Pak36 and the Tow action will appear on the vehicle

Muts

  • Guest
Re:trailer script
« Reply #18 on: 06 Oct 2003, 12:37:05 »
Wow BraTTY,
that really is a good script .... and a good addon too.
You even managed to animate the wheels on the PAK, but it looks like it will only work on the PAK.
Quote
_trailer animate ["wheels", _aphase]
So I will have to figure out another way to animate the wheels of a trailer.
By the way: did you also have problems with "orbiting" objects? 'cause when towing, the PAK is one of those "objects that don't adjust to terrain".

Now I am working with the SetVelocity command  to animate the wheels ,but somehow this makes the trailer float a couple of cm's above ground....don't know why,but I'm still working on it.......
SetVelocity does make bumping the trailer into things more realistic, as the trailer no longer rides right through the object as it does when only SetPos is used, but actually collides with objects.

Also I changed the helperobject from "radio" to "logic" as I think the Gamelogic object has even less polygons than the "radio" model,but that's only a minor change
Quote
_Trailerhelper = "Logic" camcreate (getpos _Trailer)

Hope to figure Setvelocity problems out soon and will post  a new version of the script after that.

Regards, Muts





*edit*

It looks like Setvelocity is not the answer, it causes more trouble than it solves, especially on slopes.
So now I will have to look for the animation OFP uses to make wheels turn, perhaps it will be possible to animate steering as well( nice for towing cars).
If anyone knows what the names of those animations are, please tell me.
« Last Edit: 20 Jul 2004, 18:21:41 by Muts »

Muts

  • Guest
Re:trailer script
« Reply #19 on: 20 Jul 2004, 18:26:32 »
hmm tried to submit an updated script to my last post, but that didn't seem to work.

Muts

  • Guest
Re:trailer script
« Reply #20 on: 23 Jul 2004, 01:28:57 »
Sirglider of Swissmod pointed out some bug
the trailer won't follow the car over a bridge. no solution found yet.

Sirglider also had an idea to make angle limiter for the trailer.
this way the trailer won't go through the car anymore when backing up

regards Muts

sirglider

  • Guest
Re:trailer script
« Reply #21 on: 23 Jul 2004, 11:18:28 »
Hi dudes!

With the help of Muts from a Bratty's idea, I managed to tow our AA Rapier Missile launcher.

So here's one before taking position


Then in action


And finally packing everything to go back home


More info on our site:
http://ofp.info/swissmod

Sirglider, Swissmod's co-leader

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:trailer script
« Reply #22 on: 23 Jul 2004, 17:20:20 »
How didn't I notice this thread before. Must be getting slow :P
Anyway, I've made a towing script with MI_Fred quite some time ago, but our experience with it in MP missions was just horrible. The towed cart kept crashing the car when a client was desyncing. Call it lag or whatever, it made the script unusable in MP.

So, how about this trailer script. Will it work good in MP too?

Oh, and nice pics btw.  :)
« Last Edit: 23 Jul 2004, 17:20:44 by Artak »
Not all is lost.

Offline MMFF

  • Members
  • *
  • Mission Maker From Finland
Re:trailer script
« Reply #23 on: 30 Jul 2004, 07:05:49 »
Sirglider! Where did you get the car and the Rapier sam trailer ;).
Do I need to play Operation Flashpoint to be here?

sirglider

  • Guest
Car & Rapier units
« Reply #24 on: 30 Jul 2004, 08:42:36 »
@MMFF: From our coming SwissMod!  8) We're still working hard on it. It's in its final beta test phase  :P
For more info, visit our site and forum: http://ofp.info/swissmod

Enjoy  :D

sirglider

  • Guest
Version 1.24
« Reply #25 on: 12 Aug 2004, 11:20:03 »
In coop with Muts, we've advanced to the version 1.24 of the trailing script.
New features:
1) A solution (not the best, but still god for the moment) to cross a bridge.
2) A correction of the towing distance on a slope

Enjoy! And if you can implement it, don't hesitate to post it!  :D
« Last Edit: 12 Aug 2004, 11:20:47 by Sirglider »