OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: Scrumpy on 28 Nov 2003, 15:11:34

Title: feet wet pilots
Post by: Scrumpy on 28 Nov 2003, 15:11:34
Ok I can't be the only one that has at one point ummm ok lots of points been shot down and had to bail out over the ocean.... come on one of you i'm sure can come up with a survival kit for pilots shot down over the ocean i'm sure..maybe a life jacket or even better an inflatable life raft so they can get back to shore making it a lot more relistic... I know I am asking a lot but I know some of you can do great things ya just need a little push now and then... well heres hoping as i'm all out of dry clothes...so please a script or even better an addon for waterproof pilots lol.
Title: Re:feet wet pilots
Post by: scud on 05 Dec 2003, 09:20:14
(http://www.freewebs.com/ofpgenerations/OFPGENBANNER.JPG)

We have already discussed this at Ofp Gen for the
'Battle of Britain' section.
Since alot of air combat was over the water plus with raids on enemy shipping sooner or later you will have to bail in the sea.
We are trying a few different ideas.

This is sample raft  (only planning stage)

(http://users.tpg.com.au/adslo3c8/raft.jpg)
Title: Re:feet wet pilots
Post by: Lt.Shitkilla on 05 Dec 2003, 12:34:28
how are you planning on making the raft inflate (or appear) underneath the pilot before he dies??

I am backing u all the way with this addon. i love flying.
Title: Re:feet wet pilots
Post by: sa8gecko on 13 Feb 2004, 13:51:05
Sorry to dig up an old tread. I noticed it only now and
maybe Lt. Shitkilla is still aroun' here ...
Try this:

; Usage: put this line in the init field of each pilot
; or soldier who is going to get in a plane or chopper
; (or who actually is in a plane or helo)
;
; [this] exec "bailout.sqs"
;
; make first a soldier or pilot unit and then use the
; moveindriver command to put him in a plane if he has
; to start the mission in it

; next three lines by Vektorboson: are used further down
; to check if ejected pilot is going to take a bath or not

private ["_sensor"];

_sensor = "EmptyDetector" createVehicle [0,0,0]
_calcH = {private["_result"]; _sensor setpos [getpos _this select 0, getpos _this select 1, 0]; _result = getpos _sensor select 2; _result};

_pilot = _this select 0

; waits until pilot gets in an air vehicle

#check
@ ("plane" countType [vehicle _pilot] > 0) || ("helicopter" countType [vehicle _pilot] >0)
_craft = vehicle _pilot

; then waits until he exit it

@ !(vehicle _pilot == _craft)

; now checks vertical position of pilot
; and waits until he is very low

@ (getpos (_pilot) select 2 ) < 3

#loop

; check if pilot is actually on water:
; if he isn't the script gets restarded for
; another tour
; this check is done now and not at the moment
; of ejection because with the aid of the wind (?)
; the pilot could land on dry ground

~.1
?abs(_pilot call _calcH) < 3: goto "water"

; if pilot's speed is almost zero he should have
; ended on firm ground or have disembarked the
; vehicle

? speed _pilot < 1: goto "check"

; next line really does nothing: is a redundant safety check

goto "loop"

#water

; well, if he's dead, no need to worry about

? !(alive _pilot): exit

; pilot can get further damage if he's in water
; so if he's badly wounded better heal him a little

? (getdammage _pilot > 0.7): _pilot setdammage 0.7

; waits until pilot exit parachute

@ (vehicle _pilot) == _pilot

; then creates the raft and puts the pilot in it

_boat = "Raft" createvehicle (getpos _pilot)
_pilot moveindriver _boat

; now the script waits until pilot gets out of raft

@ (vehicle _pilot) == _pilot

; then all is started again: perhaps the pilot will
; take another ride

goto "check"


Substitute "Raft" with "Whatever can float" and any of your pilots
will bail out safely over water.
("Raft" was a crappy salvage raft I made, I'm to ashamed of it to
release)
Title: Re:feet wet pilots
Post by: PsyWarrior on 14 Feb 2004, 18:39:49
Greetings,

It occurs to me that this would also be great (with some modifications) for use on ships. Imagine this scenario:

All hell had just broken loose.
"INCOMING!" MacKensie, the ships weapons officer screamed, just before he was thrown to the deck as the frigate lurched to starboard.

It had started off as a simple coastal patrol. The same thing Capt. PsyWarrior and his crew had been doing for the last couple of weeks, ever since the small, scenic island behind them had turned into a killing ground. Then a big old russian cruiser had seemingly appeared from nowhere, and was now busily hammering them to death.

The internal comm crackled to life:
"Captain!" said Miller, most likely trying to fix the gaping holes in the side of the ship
"We're in trouble Cap'n!"
"Dammit, Miller, I want proper reports!"
"Multiple hull breaches, Sir, We're taking water. I don't know how much longer I can keep her afloat cap'n."
A short pause. "Very well. Prepare to abandon ship, Mr Miller."
"Aye Cap'n".

He hated this, but, really, it was the only hope for his crew. He keyed up the shipwide intercom.
"All hands, abandon ship! Repeat, abandon ship"

Alarms began blaring as crewmen ran to the emergency lockers and pulled out lifejackets. Crewman and officer alike threw themselves off of the dying ship, where they sank like rocks and promptly drowned.

The End.

You see my point, I hope...

-Supr. Cmdr. PsyWarrior
-Psychic Productions

 ::)

P.S. - You have my complete concurrence with the aircraft idea. I love flying, also, I spend hours flying round for no apparent reason, or dogfighting. I build maps with lots of replacement aircraft, and empty cars to get there. Then I get shot down over the water, drown, and have to restart the mission. This is annoying.

P.P.S. - I know the ideal addon for this: Col Klink's Zodiac RIBs. Essentially, rubber dingies, perfect for use as liferafts. I meant to have a go at scripting this a while ago, but I've been a little busy recently (typing this post, mostly...  ::) ). Still, I might give it a try, building on the script posted above (just for fun, not because I believe sa8 isn't good enough... I just like to build my own scripts.).
Title: Re:feet wet pilots
Post by: The-Architect on 15 Feb 2004, 01:42:16
Also good for modern day flying.
You could have the raft inflate or appear and use a script which would involve a rescue helo hovering at about a, Rescue1 flyinheight 4. Or even created a helo with a rescue dude coming down to pick you up.
Of course it's all pie in the sky.
Title: Re:feet wet pilots
Post by: sa8gecko on 15 Feb 2004, 08:16:41
Quote
Still, I might give it a try, building on the script posted above (just for fun, not because I believe sa8 isn't good enough... I just like to build my own scripts.).

No, no : you are right: i'm not good enough

I tried to put the above script in the init eventhandler of a pilot unit,
so that it would be completely transparent to the user (I mean no
need to call a script), but  I got strange results and failed miserably.
So in the end you're right, I'm not good enough.

Quote
You could have the raft inflate or appear and use a script which would involve a rescue helo hovering at about a, Rescue1 flyinheight 4. Or even created a helo with a rescue dude coming down to pick you up.

In effect I did just that in a mission where the player is the rescue guy:
when the player's helo passes above the pilot in the raft at very low height, this
activate a trigger and the pilot is tranferred aboard the helicopter.
Title: Re:feet wet pilots
Post by: PsyWarrior on 15 Feb 2004, 13:29:52
Greetings,

No, no : you are right: i'm not good enough

I disagree; the basis of the script is sound, it just needs adjusting slightly. What exactly were the "strange results"?

Let's see if we can get this working...  ;)

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: sa8gecko on 15 Feb 2004, 15:18:22
Thanks for your replies, PsyWarrior.

The strange results were that multiple rafts where created before
the pilot being finally put to one and let float to safety, and next time
the pilot climbed aboard another aircraft and then ejected again, he had
more to go than the previous time (hope I was clear, sorry for my
english)
So I got bored with it and let the script be called in the initialization
field of the unit, seen that this way it worked right.
Title: Re:feet wet pilots
Post by: Colonel_Klink on 16 Feb 2004, 01:31:39
I hope you guys don't mind if I do some experiments with the above script. I'm working on a similar project for the Falklands aircraft using the life jacket addon that will be released when all the testing is satisfactory.
Title: Re:feet wet pilots
Post by: sa8gecko on 16 Feb 2004, 07:07:49
Quote
I hope you guys don't mind if I do some experiments with the above script. I'm working on a similar project for the Falklands aircraft using the life jacket addon that will be released when all the testing is satisfactory.

Well, this script was sitting in my HD since last august, if I had known
it would be useful for someone I would have released it before, so:
no, I don't mind if you experiment.
BTW: looking really forward to your next release of your fishing boats:
they're great , Colonel_Klink !
Title: Re:feet wet pilots
Post by: PsyWarrior on 16 Feb 2004, 12:15:50
Greetings,

Okay, I'm going to play with this idea for a while I think. BTW, another way to check if a unit is over the water would be to use triggers (put a trigger over land, and check if the unit is not in it.

Of course, Psychic Productions scripts are designed to be fully autonomous, so this isn't an option for us, but it might be a useful way to sort out the initial problems. For boats, it should be much simpler, as they don't spend much time over land...

When a unit gets out of a boat near land, they are instantly transported about 10m away. When over water, they disembark right next to the boat, before sinking like a stone. All that needs to be done is to check how far away a unit is when they disembark, and if it's fairly close, shove them in a raft. This way, you could not only simulate abandon ship scenarios, but could 'anchor' your ship offshore, and use the raft as a tender, to move back and forth.

More concepts:
-For aircraft, after unit disembarks, needs to deflate raft and take it with them, (deleteVehicle), or they will not have it with them if they eject over water again.
-For boats, addAction to allow units to board back into their boat, or another vessel (hostile capture scenarios?!).

Anyway, I'm going to mess around with this stuff tonight, and see how much of this we can implement.  :D

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: sa8gecko on 16 Feb 2004, 12:48:06
Greetings PsyWarrior:

Quote
Okay, I'm going to play with this idea for a while I think. BTW, another way to check if a unit is over the water would be to use triggers (put a trigger over land, and check if the unit is not in it.

I don't understand you ... (I told you I'm not good !). Isn't it simpler
checking this with Vektorboson's 2 lines?

Quote
When a unit gets out of a boat near land, they are instantly transported about 10m away. When over water, they disembark right next to the boat, before sinking like a stone. All that needs to be done is to check how far away a unit is when they disembark, and if it's fairly close, shove them in a raft. This way, you could not only simulate abandon ship scenarios, but could 'anchor' your ship offshore, and use the raft as a tender, to move back and forth.

That's a beautiful idea, using raft as tender.

Quote
-For aircraft, after unit disembarks, needs to deflate raft and take it with them, (deleteVehicle), or they will not have it with them if they eject over water again.

You sadic ! ;D

Anyway when you have finished with this I've a couple more script
I would like someone to have a look, so if you're not to busy ...
(I'm joking, but the scripts are there for real). I'm sorry if I'm not
coming up with more suggestions, but my creative period ended
last october ...
Title: Re:feet wet pilots
Post by: PsyWarrior on 16 Feb 2004, 14:49:39
Greetings PsyWarrior:I don't understand you ... (I told you I'm not good !). Isn't it simpler
checking this with Vektorboson's 2 lines?

Yes, probably, but while vektorboson's a damned good scripter, the triggers will definately detect if a unit is over water of not. They will only be for testing purposes anyway, the final script will not use them.

Yeah, the tender concept was one of my few 'inspired' moments...

and anyway, it's the pilots own fault if he doesn't collect his equipment... and it would prevent the constant creation of about 10 rafts for each unit, if he bails out over the water 10 times.

I would be pleased to have a look at your scripts when this is finished.

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: sa8gecko on 16 Feb 2004, 18:34:13
Quote
and anyway, it's the pilots own fault if he doesn't collect his equipment... and it would prevent the constant creation of about 10 rafts for each unit, if he bails out over the water 10 times.

That's true. Doing this would be simply putting this line
Code: [Select]
deletevehicle _boatafter having checked the pilot is no more in the raft. Because the AI
surely won't deflate the raft on his own !
I left the raft stay where they were because in the mission I made (well,
it's still in the editor cause I don't know how to make intro, outro and,
really, I never cared to learn, my fault) the downed pilots were left
in the water until I get to save them with my chopper, and the rafts
were beatiful to see left empty in the ocean. At least in my opinion.
Title: Re:feet wet pilots
Post by: Messiah on 16 Feb 2004, 18:45:55
check the main page - colonel klink is working on lifevest and lifebouy addons  :D
Title: Re:feet wet pilots
Post by: PsyWarrior on 16 Feb 2004, 18:54:12
Greetings,

So, we let the designer decide. Scripts by Psychic Productions usually leave a lot up to the designer, so the same will likely be true here. For instance, when executing the script, choose:
-Enable/ disable raft deflating
-Enable/ disable automatic raft deflation

so you would exec the script with [pilot1, air, enable, enable] or something similar.

Give me a while to have a go at this, and we'll see what we get  ;)

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: fragsta on 17 Feb 2004, 13:10:00
Has anyone made a working mission for the life raft thing yet?

If you need a life raft addon, go to www.ofp.info, there is one on their first page of boats, i think. Or the second page. I know they have at least one.

If anyone does have a working mission, attach it here. It would be good to implement this into the next ECP, don't you think?
Title: Re:feet wet pilots
Post by: PsyWarrior on 17 Feb 2004, 13:20:54
Greetings,

UPDATE:
Started working on the script yesterday, made quite a lot of progress. Also ran into a couple of problems:

-Not 100% reliable - sometimes, liferaft would not be created and you'd sink. RESOLVED
-Difficulty accurately detecting presence of ships RESOLVED
-Huge problems with NearestObject command (for unit boarding his boat/ another boat from a raft). Unable to get nearestObject command to detect objects of type "Ship".

New Concepts:
-Hostile takeover: for capturing enemy boats. If you're able to get close enough, you will be able to attempt a hostile takeover of an enemy boat. Probability of faliure is multiplied by number of people on board (e.g. one person on board: performs skill check between enemy and unit in raft.) If the boat is empty, the probability of success is 100%. If the boat is crewed, probability is divided by no of people on board, +/- the skill of the unit in the raft.
-Psychic Productions general issue linking script, for passing variables to scripts executed using the addAction command. Work in progress.
-Allows designer to decide what unit to use as the raft. Could be Col. Klink's lifejacket (when it comes out) for bailing out, or a Zodiac for use as a tender. It could even be an LSD, if you wanted  ::)

More updates soon.

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: sa8gecko on 17 Feb 2004, 13:49:51
Quote
Has anyone made a working mission for the life raft thing yet?

I have but it's still in the editor, and more I will not finish it because
I'm not good at it. Here's the idea: western planes are send on SEAD
mission in the southern part of Malden, and some of them get shot down.
Maybe all, maybe none (this is very difficult). Some of those daring pilots
will end their journey on water, here the raft comes in handy. The player
rescue team is sent to save the survivors. Everytime a pilot is shot down
he gets attached to the player's group, this way you can control his
movement and hopefully evitate that he would be found and killed by
enemy patrols. Every pilot killed after bailing out you get negative rating.
If you want to take a look be advised it needs lot of addons.
I forgot to mention that you rescue the downed pilots with
your chopper (I used BAS Blackhawk because BIS ones are
too vulnerable and for the map display).
Anyway
if you are interested, fragsta, message me. BTW : this mission uses
the crappy raft addon I made, eventually I'll send you along with it.

PsyWarrior: I thought the script was reliable (this is the bad of testing
it by yourself): I'm happy you made it more solid !
About the nearestobject thing: I have similar problems with tanks.
It works with planes and helos, though. I hope someone could solve this.
If you are still interested, PsyWarrior, I'll make you see why this
nearestobject thing is so important for me.
Title: Re:feet wet pilots
Post by: fragsta on 17 Feb 2004, 14:31:50
Psywarrior: This looks excellent. I suggest you go about putting it in ECP somehow.
gecko: Could you send me a copy of that mission, or maybe just post it here as an attachment, but without the life raft addon? Instead of the one you made, you could use the Zodiac (go here: http://ofp.gamezone.cz/index.php?sekce=unofaddons/boats).
Title: Re:feet wet pilots
Post by: sa8gecko on 17 Feb 2004, 16:26:24
To Fragsta:
The Raft addon I made isn't really a problem, as it's 12kb size. So
I'll send you to evitate to rewrite the mission.
But you need these addons:
- F-18 by Hudson & Pennywise ,latest version (1.3 I think)
- BKM Sa-11 with modified config & proximity fuse, I'll send them
along with the mission providing you can unpbo and then pbo again,
this because if you use the standard addon this wouldn't shot down
anything
- MTLB pack by Marfy for the Sa 13 and the ZU 23

Optional addons you must have, but the mission can do without
them, I need to know though if you have them or not so I can
modify the mission accordingly:
- F111 by SKC addons
- BAS Blackhawk (your chopper, can substitute with BIS one)
- DKM Comanche (it's your support buddy, can do without)
If you have latest VIT APC pack I can substitute the SA 13 and the
ZU 23 with the ones provided with it.

With the modified config,scripts and the raft the whole thing should not
exceed 30 kb zipped.

Let me know.
Title: Re:feet wet pilots
Post by: fragsta on 17 Feb 2004, 19:05:52
I think I will leave it, thanks. I only have the BAS Blackhawk out of all of those, and I'm on 56k :(. Thanks anyway.
Title: Re:feet wet pilots
Post by: PsyWarrior on 17 Feb 2004, 22:14:16
Greetings,

Thanks, Fragsta, Perhaps I will see about including this in the ECP mod.

News: I hope to have the scripts (3 currently, but this number will increase due to the necessity of using the addAction command) finished, and the internal BETAs done by the end of this week. With enough luck and skill, the scripts will be signed off for public OFPEC Beta sometime next week.

Regards,

-PsyWarrior
-PsyProductions

P.S. Will be launching a public development thread on the Psychic Productions forums soon. Watch for new information. Staff should note that a full development diary will be available in the staff only editing discussion area.

Title: Re:feet wet pilots
Post by: vektorboson on 18 Feb 2004, 04:11:19
the triggers will definately detect if a unit is over water of not. They will only be for testing purposes anyway, the final script will not use them.

Hi,

the class "EmptyDetector" is a Trigger. So whether you use the three lines from me, or you use a trigger, there is no difference, because my code creates a "Trigger" ingame, instead of creating a Trigger in the Editor.
Title: Re:feet wet pilots
Post by: Colonel_Klink on 18 Feb 2004, 11:03:11
Quote
Huge problems with NearestObject command (for unit boarding his boat/ another boat from a raft). Unable to get nearestObject command to detect objects of type "Ship".

This is the same problem I am having too. Seems a boat that already has a crew takes on the name of the unit, and not the boat itself.
Have tried:
unlocking the target vehicle
unassigning the player from the current vehicle and assigning to the target vehicle as cargo
used the 'getout', 'eject' commands with no effect apart from drowning
used the get in cammand on the target.. drowned again
used the moveincargo command.. still drowned.
Title: Re:feet wet pilots
Post by: PsyWarrior on 18 Feb 2004, 11:04:16
the class "EmptyDetector" is a Trigger. So whether you use the three lines from me, or you use a trigger, there is no difference, because my code creates a "Trigger" ingame, instead of creating a Trigger in the Editor.

! :o

I was completely unaware that you could create triggers in .sqs!

Okay... This makes life easier in terms of autonomous scripts. No more "put a trigger in this place" in the documentation then.

You really do learn something new every day, then...  ::)

-PsyWarrior
-PsyProductions

P.S. sorry, missed Col. Klink's post. Yes, a boat does take on the name of the commanding officer on board (so Commander in case of larger ships, driver for zodiac/ PBR/ tiger etc.). But all I want to do is find the nearest object of type "Ship" to the liferaft. But for some reason, I can't get the nearestObject command to return anything, whether or not it's set to "ship", "man" or "any". My theory is that the liferaft starts life off with one name (just after creation, but before the unit is moved into it), and then changes to the name of the occupant (meaning that the object referred to by _lifeRaft no longer exists). This would probably result in a null object. Options:
-Use the occupant as the nearestObject operator
-Create a trigger (thanks again Vektor) and use that to detect any objects within a certain distance.

As for your problems getting units to moveInCargo, I can't help you there. I haven't experianced this problem... Sorry.
Title: Re:feet wet pilots
Post by: sa8gecko on 18 Feb 2004, 12:53:42
Sorry if this ain't much to do with this topic, but it regards the
nearestobject thing. I was working on an Arena script that does
intercepts all missiles and rockets, including the ones that don't
activate the eventhandler "incomingmissile". To do so I thought
it would suffice to write nearestobject [_tank, "AT3"] to locate any
of such weapons since they all descend from AT3 class. I was wrong,
and for locate the missiles I had to write down an array containing
all the weapons names (i.e.: "LAW", "RPG", "maverick" and so on).
Similar things happens with tanks and apc. On the contrary it works
well with choppers and planes, that's why I was able to make a SAM
firing car. If this nearestobject command would work in a similar way
with tanks I could have built an AT missile car too. If someone have
a clue why this doesn't work, please explain (I hope Vektorboson
read this and come up with an answer ...)
Title: Re:feet wet pilots
Post by: PsyWarrior on 18 Feb 2004, 14:52:01
sa8,

My apologies for not noticing your reply earlier about script reliability. The reason is, the Psychic Productions version of the script uses a looping conditional check rather than a conditional wait command (@). The reason for this is that I needed to check a couple of other conditions (such as if the unit was dead) in addition to checking if the unit was !(in _boat).

Regarding the nearestObject command, This seems to be a little unreliable. It detects some things perfectly, but others not at all. I haven't had too much success with objects of type "Ship" yet.

Updates thread posted on Psychic Productions Forums on the Scripting discussion board. Please note that, due to the actions of certain guests on the forum, you must register to reply.

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: sa8gecko on 18 Feb 2004, 21:41:02
to Colonel Klink and PsyWarrior:
I've done some tries with the nearestobject thing( BTW: its range it's
not fixed but variable).
What I did was to place two (or more) boat in the editor in a range of
about 50 meters and putting in the initialization field of one the
following: [this] exec "retrieve.sqs"

retrieve.sqs

Code: [Select]
_unit = _this select 0
_coordx = (getpos (_unit) select 0) + 40
_coordy = getpos (_unit) select 1
_coordz = getpos (_unit) select 2
_target = nearestobject [[_coordx,_coordy,_coordz],""]
? "ship" counttype [_target] > 0: goto "print"
exit
#print
hint format ["%1",_target]
exit

This way the nearest ship at [coordx+40,coordy,coordz] gets returned
and printed on screen (40 is arbitrary, I choose this not to have the
ship calling the script always returned
). I know you can say that you
are still at the starting point. But if you do a check in four direction
(left,right,before and behind the raft) at some meters distance, maybe
it will work. Being in the water helps a lot, since is not probable that
other objects other than ships would be around.
Title: Re:feet wet pilots
Post by: vektorboson on 18 Feb 2004, 22:26:25
-Create a trigger (thanks again Vektor) and use that to detect any objects within a certain distance.

Well, as I said, the "EmptyDetector" is a trigger, but you see, it's called "EmptyDetector", so it means Empty Trigger. There is, I'm afraid, no way to set radius, condition and stuff to this trigger. Sorry, my bad.
Title: Re:feet wet pilots
Post by: PsyWarrior on 19 Feb 2004, 14:02:20
@Vektorbosun - verdammt. Must remember to do my research before posting.

@sa8gecko - It's stupid having a nearestObject command that detects the unit calling it. However, it seems that your method would work. If you use a 10m radius, detecting anything that isn't the source unit (the liferaft) in all directions, it should be possible to detect any naval units in the area.

It would have to be extensively tested to ensure that it was reliable, but I think it could work.

I'll get to work...

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: Tuulos on 20 Feb 2004, 20:10:35
Would it be possible to pilot float with his life jacket and then airplane would fly over and drop a raft where the pilot could climb. Trenchfeet's desert camouflaged Ju52 use a nice script for dropping crates, so maybe it could be altered somehow?

Ps: Sa8 please post an image of your raft here, so that i can see what's it like. (i might have an idea...)  ;)
Title: Re:feet wet pilots
Post by: sa8gecko on 21 Feb 2004, 13:03:42
Quote
Ps: Sa8 please post an image of your raft here, so that i can see what's it like. (i might have an idea...)
Sorry, I can't post images (I don't know how to do and I
haven't a site). Will try to attach it to this post ...
Anyway it's crappy, I use it only for test purpose and in my own
missions.
Title: Re:feet wet pilots
Post by: Tuulos on 21 Feb 2004, 18:16:38
I think it will do the trick :) I don't want the life raft to have a motor ;) Could you post it to me? And can you make a simple sample ;D mission for me that doesn't require addons? Eg. only A-10, pilot and the script?
I would be very grateful, because i'm not too good with the scripting and stuff... ???
Title: Re:feet wet pilots
Post by: sa8gecko on 21 Feb 2004, 23:24:25
Actually it has a motor. This was done because if I was the pilot, I
didn't want to be left stuck in water. Sure it' s slow. I'm sending
it anyway cause it's a small file. Be advised fire geometry isn't done,
so you can't shoot at the people in the raft.
If you want a proper one look for Colonel Klink's.
As for the mission, place it in your OPF\Users\"yourname"\missions
folder, and place raft.pbo in your addon directory.
The mission contains an early version of the script (look at date):
I'm lazy and I didn't replace with the version I posted in these pages.
Basically a pilot (who's in your group, BTW) ejects over sea,  you are
in the chopper and should go down to retrieve him: fly very low and
very slowly above him and he'll be transferred aboard the blackhawk.
Title: Re:feet wet pilots
Post by: Tuulos on 21 Feb 2004, 23:49:02
What i meant was that it does not have a motor that can be seen :D It's more realistic that way, it's not too nice looking that a pilot would have Zodiac with him ;)
Title: Re:feet wet pilots
Post by: Colonel_Klink on 22 Feb 2004, 11:58:04
Dunno if this is good news or not as it is sort of related to the thread. I have managed to get out of a life jacket/ life ring and board a fishing boat. Have then abandoned ship and boarded again. Also managed to board a fishing boat from the police launch I am building, shoot the driver of the fishing boat and either take over the fishing boat or return to the launch. Still working on the scripting for this, but so far the tests have been pretty good.
This works only with the player so far.
Going to use a similar method to rescue a guy from the water with a chopper.
Title: Re:feet wet pilots
Post by: sa8gecko on 22 Feb 2004, 13:34:30
Colonel_Klink: why these should be bad news ? I'm looking forward to
have them in my HD ! BTW: I haven't heard news of PsyWarrior since last
tuesday. Even on his site he posted last on the 19th. So I don't know
how his work is going on. I will probably need him for another cool project.
Quote
This works only with the player so far.
I think a lot of work should be done to make the AI do this too.
I mean if you want the AI react indipendently from the mission designer,
that is board the enemy vessels by its own rather than simply destroy
them, after having considered the goods and the bads (as always I
can't be to clear, I apologize)
Quote
Going to use a similar method to rescue a guy from the water with a chopper.
At least someone could release some good SAR mission, possibly
the player being the SAR pilot. Even if I think that anyway the majority would
prefer the chopper be spawned to save them from water ...
Title: Re:feet wet pilots
Post by: PsyWarrior on 22 Feb 2004, 18:19:16
*BOOM*

*PsyWarrior bursts through wall of OFPEC with fireworks and other explosives*

I Have Returned.

I apologise for the delay.  ::)

So, to buisiness...
How did you accomplish this Klinky? I've been using the cyling nearest object command from 4 directions (as suggested by sa8) but I'm still experimenting with it to achieve the maximum success rate with the minimum lag (a lot of optimisation required to get this working perfectly). Getting the unit out of the raft and into another boat is easy, but finding the nearest boat to the unit... isn't.

Using the 'Multiplexing object proximity detector' (as I have dubbed the nearestObject command method above), it is possible to 'lock on' to the objects captured by the 4 nearestObject cycles (hopefully this is making some sort of sense to someone...), assigning them to variables, and detecting which one is the closest to the raft. It has a fairly high success rate, although if there are more than 4 boats in the area, sometimes a few boats slip through the net.

We are working to resolve this.

Please share your insights with us Colonel - together we can produce a powerful, versitile and still easy to use bailout script.

I will work on implementing SAR elements later. Chopper spawning is an excellent idea, and to this end, another 3 optional variables will be added to the exec line (enable/ disable, type of chopper, place for chopper to take survivors). If they are left empty, this part of the script will not execute.

[pilot1, (...) enable, UH60MG, homebase]

All the optional parts of the script will be called at the end of the exec line, so the designer can simply leave those parts blank if s/he doesn't want them.

The reason my PsyProductions Forums thread has not been updated is due to administrative problems, which will be resolved in the near future.

-Supr. Cmdr. PsyWarrior
-Psychic Productions

P.S. - The Psychic Productions Forums thread -HERE- (http://psyproductions.proboards21.com/index.cgi?board=ScriptDis&action=display&num=1077112617&start=0) has now been updated. A full feature list can be found there.
Title: Re:feet wet pilots
Post by: sa8gecko on 22 Feb 2004, 19:05:58
welcome back, PsyWarrior.

Quote
It has a fairly high success rate, although if there are more than 4 boats in the area, sometimes a few boats slip through the net.
You can use a wobbling-rotating detecting algorithm (even if I think that
4 boats on boarding range are, well, too many ...). I mean the four
direction are not fixed but rotate some degrees everytime a check is
done. And checking distance is varied too. If this is made asincronous
you should have an high probability of detecting every vessel in the range of 20 meters from the ship (depending on the wobbling distance).
Considering that boats are not fast movers this check could be done
once a second, to decrease lag (how fast is your PC, Psywarrior ?)

How long it's gonna take you to finish all this, PsyWarrior ?  I have
something else in mind. I will message you if you are interested.
(OK, I'm a moron, but if the bailout script seemed good to you, what
I will show you is much more interesting)
Title: Re:feet wet pilots
Post by: PsyWarrior on 22 Feb 2004, 19:38:09
Greetings, sa8, glad to be here.

In fact, the MOPD system relies on a wobbling-rotating detecting algorithm similar to the one that you describe to ensure capture of all boats within range of the liferaft. However, by it's very nature, it's difficult to lock on to more than 4 boats at a time using the current version of MOPD(0.5). however, version 0.6 of the system will use an array to capture all vessels in range, and will then perform checks to determine which is the closest.

The real concern is not the speed of boats, but the movement when there are many boats in the area (I mean a lot, not about 5...)

My PC is 1.5+ GHz (+ because it's overclocked a little) with a GeForce 4 Ti4800 AGP 8x with 128MB Ram and VIVO. OFP runs pretty well on it, so lag is minimal. However, people running on a 700MHz with a GeForce 2 will not be amused if I haven't optimised the script properly.

Yeah, go ahead and IM me sa8, I look forward to your next challenge. It will take a little while longer to finish this one (balencing RL stuff with OFP), but Psychic Productions is always willing to help out in the community.

-PsyWarrior
-PsyProductions

P.S. - Ignore the dates on the PsyProductions forums. They are completely inaccurate. Also ignore the "last updated topic" stuff, as this doesn't seem to update properly. Hopefully, when PsyProductions Command has enough funding, we can upgrade the forum to something that works...  ::).
Title: Re:feet wet pilots
Post by: Colonel_Klink on 23 Feb 2004, 01:42:12
Okay. I've had a lot of fun doing this (well as much fun as a post half centenarian can handle :) ).
Today i've managed to get the player (in a life jacket) to swim (if thats the right term) towards a fishing boat which is detected by the nearestobject command. When the life jacketed player is within 5 meters of the fishing boat he gets a menu command "Board Ship". Use that command and the guy is seated in the first empty cargo space (I haven't worked this out if there is no available space yet).

The key to getting the player to board a ship as cargo is simple: the join command must be used (God knows I tried everything without it)

e.g. [player] join _boat    (or whatever the boat/ship is called in the script)

The above allows the player to become part of the boat crew so's to speak, which isn't the same as having the player board the ship and then taking over it. In this case I omitted the join command and had the guy setpos'd on the boat. The boat has to have a  roadway lod of the walkable deck area, and the boat has to be dead in the water, otherwise the boat will move and the player will be shunted to the stern or side which inevitably leads to the player being dumped overboard.. and if he isn't wearing a life jacket he kinda dies :)

Getting back to the join command. This is fine for rescues but does have the problem of the player becoming part of the ships contingent as explained above.  I have a walk about deck command that allows players on board a boat to get out of the cargo/driver/gunner positions, but this leads to problems if the player isn't the driver. Once the player is free from the cargo position the driver moves the boat for some reason.. which inevitably leads to the before mentioned dumping overboard.

So i have a question: How does one unjoin the player from a group?

More on this as it progresses.
Klinkster out.

BTW sa8gecko  the bailout mission helped me with the idea to use the join method.
Title: Re:feet wet pilots
Post by: sa8gecko on 23 Feb 2004, 06:05:59
Quote
Once the player is free from the cargo position the driver moves the boat for some reason.
Probably because he's trying to mantain formation.

Quote
So i have a question: How does one unjoin the player from a group?
Doesn't player join GRPNull work ? (sorry if I have missed the
exact meaning ...)

This all look so good on paper ... keep up the good work,
Colonel_Klink !
Title: Re:feet wet pilots
Post by: Colonel_Klink on 23 Feb 2004, 10:20:59
Update:
Tested rescuing ai from the life jacket, life ring and dinghy when called from the init field of the Police launch, fishing boats, Falklands, BIS and BAS choppers, the Tiger gunboats, zodiacs and BIS PBR. At the moment the AI joins the player group.

Title: Re:feet wet pilots
Post by: Messiah on 23 Feb 2004, 11:49:24
Probably because he's trying to mantain formation.Doesn't player join GRPNull work ? (sorry if I have missed the
exact meaning ...)

This all look so good on paper ... keep up the good work,
Colonel_Klink !


yup, nearly there... [unit] join GRPNul  ;)
Title: Re:feet wet pilots
Post by: sa8gecko on 23 Feb 2004, 11:56:23
Thanks Messiah for correcting me. I hope this didn't cause
Colonel_Klink any trouble.
Title: Re:feet wet pilots
Post by: Colonel_Klink on 23 Feb 2004, 11:59:51
Thanks for the grpnull bit. Will try that tomorrow.
BTW any ideas how toensure that the guys that have been rescued can be put back into their original team. For example imagine rescuing 12 guys (a squad) and only having 6 cargo spots which means two trips to rescue them. Once rescued they return to their own team. Now this is from within an addon script.. Could it be done?

Next: How do I determine how many empty cargo slots on my vehicle? I want to be able to rescue say the squad as above.

Also this needs to be determined if a rescue boat comes to me (player) and it has no empty cargo slots.
Title: Re:feet wet pilots
Post by: PsyWarrior on 23 Feb 2004, 12:41:38
Thanks for the grpnull bit. Will try that tomorrow.
BTW any ideas how toensure that the guys that have been rescued can be put back into their original team.

Before placing in the new group, do
_origGrp = group _unit
Assuming that you want to set a local variable called _origGrp, and that the unit you're going to put in the boat is referred to as _unit.

Just keep the script running until the unit has disembarked, then
[_unit] join _origGrp
Should work.

You may (or may not) want to wait for a short time before releasing this addon, as you might (or might not) want to use some of the stuff in the PsyProductions script.

A question: How did you detect the closest boat to the player/ unit bailed out? Did you use a similar method to MOPD, documented above, or did you use something completely different?

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: Tuulos on 23 Feb 2004, 12:45:13
Klink, i think i know what could be realistic: If the boat is full, it 1. radios for another boat, 2. leaves a Zodiac for you when it goes to empty it's cargo.
And by the way, could you make a script that a for example a coast guard airplane flies over and when the plane spots you they would drop Zodiac or live raft where you could climb and wait for a boat/helicopter they called with radio?
I think that SpawnVehicle or something might do the trick for spawning the Zodiac.

And now when I remember, thanks for the mission sa8 :)
Title: Re:feet wet pilots
Post by: PsyWarrior on 23 Feb 2004, 13:06:55
Greetings

The command you're looking for is

createVehicle

Which has to be used in a script like this anyway. This sort of stuff will probably not be implemented in the release version of either col_klink's (although I can't speak for him) or the PsyProductions scripts, as it is very mission specific stuff. Radio channels and the like need to be defined by the mission creator.

However, it would be possible for the mission designer to script this, and a script may even be released later which does this sort of thing.

I can say with certainty that, while radio broadcasts (sideChat and the like) may be used, custom radio 'callsigns' (the ones set off by the player in the command menu) will not be used in V1.0 of the Psychic Productions script.

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: Messiah on 23 Feb 2004, 13:12:57
klinkers.... its possible to check if the driver is there, gunner as well - CoC did it with the UA i think, so surely it should be possible enough to check cargo?

i'm no scripting guru, so don't know how you would go about it off hand, but i'm sure there are people here who could get it working.
Title: Re:feet wet pilots
Post by: PsyWarrior on 23 Feb 2004, 13:30:39
Messiah,

It is possible to check how many units are in cargo, as long as you know what crew the boat has. You could:
count units in _boat
(rough syntax only), minus the crew. So if a boat had just a driver, and 3 people in cargo, the count command would return 4, - the driver = 3.

If you had driver, commander and gunner, and 3 people in cargo, you would get 6, - 3 = 3.

The problem is, you have to know how large the crew of the boat is. This could be done, in theory, by checking who the driver, commander and gunner are using

_drv = driver _boat

For example. If nothing is returned, you don't count them.

So MKII PBR, would return for driver and gunner, but not for commander (assuming it was fully crewed). You would then count the units in cargo using

_cargo = (count units in _boat)- 2

(again, rough only).

I can't test this without being on a computer with OFP (which i'm not at the minute), so no guarantees.

Hope that made some sense...  ::)

-Supr. Cmdr. PsyWarrior
-Psychic Productions
Title: Re:feet wet pilots
Post by: Messiah on 23 Feb 2004, 14:56:08
going on that.... couldnt you place a large trigger over the whole map area, and count units and add them to a list.... then use some pretty simple scripting to see if any in that list are in the boat.... that would seem a simple enough work around - its the same basic stuff i did to make a 'shout for medic' script a while back - can be done, as i did, for each side as well (triggered by west, east, resistance, civilian) so you can decide who can be in the list and can get into the boat...

klinkers, i think that may be the simplest way to do it
Title: Re:feet wet pilots
Post by: PsyWarrior on 23 Feb 2004, 19:00:52
Greets,

Yes, it could always be done with triggers, but if the Colonel wants to publish the script as part of an addon (not as a mission design script), it needs to be completely autonomous.

So triggers probably would be easier in one respect, but the addon would require the mission designer to put the trigger down before the addon would work properly.

So, conversely, it's easier to deal with the code in the script, rather than leave it up to the mission designer who might be a complete novice.

Personally, I like to make my scripts autonomous so that they can be used and reused with very little actual effort (usually just changing things in the exec line of the script).

But triggers is a very valid option for anyone making a SAR mission, and who doesn't want to wait. It could also be used for testing purposes, to ensure that my scripting actually works at all  ::).

-PsyWarrior
-PsyProductions

UPDATE: Seperate AI control scripts introduced so that AI will correctly handle bailing out.
Title: Re:feet wet pilots
Post by: fragsta on 23 Feb 2004, 21:15:37
Are we close to seeing this script?
Title: Re:feet wet pilots
Post by: Colonel_Klink on 24 Feb 2004, 01:51:44
At the moment the scripting I'm using is integral to the fishingboat/police launch/ lifejackets etc. But can be used by other addons using the init section.
Just to clarify.. I'm a novice script writer so A lot of what I am doing is trial and error. :)

To detect the rescue boat, or the guy in the life jacket I used the nearestobject syntax. This is fine for detecting 'known' boats, choppers etc as in the fishing boat addons that will also be able to detect all BIS boats and choppers as well as the Falklands mod ones.

Its a pity there is no 'typeof' command to check from a base type. e.g. boatw is a base, or even ship/smallship to go back to the parent class of boat. Helicopters would be easy as helicopter is the base class.

A typeof command would look something like this (presuming)

First check for nearest object then check the typeof unit as in:
 [psuedocode]if _nearestunit is typeoff ship then blah blah blah[/endpsuedocode].

EDIT:* Just looking at the countType command
Code: [Select]
"Tank" countType list triggerOneNot sure how this could be implemented but will give it a try.
END EDIT

Not sure when the next fishing boat release will be as I'm also looking at having the zodiac on the back of the police launch as being deployable which also allows the use of a zodiac being used as Tuulos suggested above.

At the moment I use the createvehicle command to create instances of the life jackets etc. I dont play multiplayer and have no idea how the addon will behave on a server. It may be that someone with more grey cells might be able to make a better job of it.

I will try the count idea to check the number of empty cargo slots.

Thanks for everyone's input.
Cheers
Klinky
Title: Re:feet wet pilots
Post by: PsyWarrior on 24 Feb 2004, 12:11:32
Greetings,

@fragsta - The PsyProductions script will be in the Beta Testing board here soon, after finalising and internal testing. It should be ready for general release (as V1.0) sometime in the next two weeks.

@Col Klink - countType is what the PsyProductions script uses, and it's invaluable. Once you've picked up the objects in the area, you can filter them using

_ships = "SHIP" countType [_obj1, _obj2, _obj3, _obj4]

detecting any unit of type "SHIP", and numbering

Be careful when using nearestObject that you don't detect the player unit. This has been a great problem with the MOPD system, as it periodically detects the source unit (i.e. the player), and my attempts to filter this have not yet succeded. I have tried

? _targ1 == _unit: _targ1 = objNull
and
? _targ1 == player: _targ1 = objNull

With little success. It will not detect if the target is the same as the player. For reference, _targ1 is the target picked up the nearestObject command after the first cycle of the MOPD system. The current version of MOPD (0.5) cycles 4 times and therefore, selects 4 targets (_targ1..._targ4).

Has anyone got any ideas on how to resolve this?  ???

Looking forward to the release of the lifejackets Colonel (it does look a little stupid bailing from a PBR in a zodiac, which is almost as large)  ::) , and the next version of the fishing boats.

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: sa8gecko on 24 Feb 2004, 12:52:36
Quote
e careful when using nearestObject that you don't detect the player unit. This has been a great problem with the MOPD system, as it periodically detects the source unit (i.e. the player), and my attempts to filter this have not yet succeded. I have tried

? _targ1 == _unit: _targ1 = objNull
and
? _targ1 == player: _targ1 = objNull

Well, you know the player position:
? position (_targ1) == position (vehicle (player)): ...
I don't know if arrays can be compared this way, but it should work,
assuming the player or _targ1 is not moving too fast.
Otherwise check distance:
? ((vehicle (player)) distance _targ1) == 0: ....
if the distance method above you can't discriminate, try relaxing
the condition a little:
? ((vehicle (player)) distance _targ1) < 0.2: ...



P.S.: Footmunch has finally read my message, PsyWarrior. You will
have news soon.
Title: Re:feet wet pilots
Post by: PsyWarrior on 24 Feb 2004, 13:16:59
Greetings,

@sa8gecko - The distance check will not work. A hint format check of the distance between unit and the target reveals some strange results:

hint format ["Distance from target: %1. Target: %2. Player: %3." _targ distance _unit, _targ, _unit]

result: "Distance from target: 1.9886468[approx]. Target: WEST: Echo Black 2 (PsyWarrior). Player: WEST: Echo Black 2 (PsyWarrior)."

So, clearly, _targ and _unit are the same, despite the fact that the filters should have prevented this. Yet, they are about 1.9 (variable) m away.

Setting this hint to loop produces more strange results. The distance varies around the 1.98... mark, and does not remain constant, despite the fact that the player should always be the same distance away from himself.

Checking the position is inspired, though. I can't test it now, but I'll have a go at it ASAP. What really annoys me though, is that the _targ and _unit are clearly identical, but I can't get a "_targ == _unit" conditional to detect this.  ???

-PsyWarrior
-PsyProductions
Title: Re:feet wet pilots
Post by: sa8gecko on 24 Feb 2004, 13:32:35
Quote
@sa8gecko - The distance check will not work. A hint format check of the distance between unit and the target reveals some strange results:

hint format ["Distance from target: %1. Target: %2. Player: %3." _targ distance _unit, _targ, _unit]

result: "Distance from target: 1.9886468[approx]. Target: WEST: Echo Black 2 (PsyWarrior). Player: WEST: Echo Black 2 (PsyWarrior)."

So, clearly, _targ and _unit are the same, despite the fact that the filters should have prevented this. Yet, they are about 1.9 (variable) m away.
probably because it is vehicle (player) to be checked, and not the
player itself. Otherwise it's not understandable, lest it has
something to do with the player being in water. Try on firm ground.
Title: Re:feet wet pilots
Post by: PsyWarrior on 24 Feb 2004, 13:46:46
Have tried with player, _unit, vehicle player and vehicle _unit, all with the same effect.

I'm not on a PC with OFP at the moment, but when I get home I will do some more testing.

-PsyW
Title: Re:feet wet pilots
Post by: Colonel_Klink on 25 Feb 2004, 02:01:59
The Zodiac launch and the 2 extra life rafts (in containers on the focsile ???  are now both deployable and retrievable by the player at the helm of the police launch. Working on a method now that will enable a pilot in a lifejacket to swim to a life raft and wait to be picked up. I can see this being useful for WW2 scenarios rescuing downed pilots over the Atlantic, as well as others.
Here's some screenies of the launch and zodiac:
(http://www.dc3d.co.nz/Utopia/polLaunch.jpg)

(http://www.dc3d.co.nz/Utopia/polzodiac.jpg)
Title: Re:feet wet pilots
Post by: Messiah on 25 Feb 2004, 06:50:04
veeeeeeeeeeeeeery nice work klinkers
Title: Re:feet wet pilots
Post by: sa8gecko on 25 Feb 2004, 07:55:27
It's impressing what you have done, Colonel_Klink.
You can force the pilot to go to the raft position with the "domove"
command (if your lifejacket permits movement in water) and then when the downed pilot is near (pilot distance raft < ...) put him in it directlty.
If the lifejacket doesn't permit movement you could use a simple
setvelocity command in the direction of the raft. You must use some
trigonometry and vector algebra, but nothing too difficult.
Title: Re:feet wet pilots
Post by: Colonel_Klink on 25 Feb 2004, 10:57:19
@sa8gecko
The life ring/life vest/ row boat can all move... slowly. Onl;y problem is at the moment I'm using the boat class which leaves a foam trail. I have experimented with the car class, but the ai vehicles seem to appear higher in the water than the boat ai, or the player> I will experiment with the domove command as I think you are on the right track there. What I want to be able to do is be able to drop a life raft off to a downed pilot and the pilot will 'swim' to the raft get on baord and wait for rescue.

Beta pic of the 6-man covered liferaft that is deployed from the police launch.
(http://www.dc3d.co.nz/Utopia/raft2.jpg)
This hopefully will be the last model to be made for the pack that has expanded far beyond what I ever imagined 2 years ago when I first started the fishing boat. Next is finalising the models then a concerted effort on the scripts before the next beta test.
Title: Re:feet wet pilots
Post by: Messiah on 25 Feb 2004, 11:12:39
was thinking.... maybe use some of the dying animations to make the guys lie down in the raft - the driving animation looks a little funny  ;)
Title: Re:feet wet pilots
Post by: Colonel_Klink on 25 Feb 2004, 11:30:39
True. I'll probably take the driving anim and make a static seated anim from it. I would do a moving one but damned if I know how to do it in ofpanim.
Title: Re:feet wet pilots
Post by: Messiah on 25 Feb 2004, 13:25:53
its a bugger of a program - i was going to learn for PUKF, but we found some people who could do it better  ;D

static ones are simple enough if i remember correctly
Title: Re:feet wet pilots
Post by: DBR_ONIX on 25 Feb 2004, 18:36:44
OFPAnim is simple if someone tells you how to get started :)
I went from not being able to do anything to making okay anims in a bout 1 hour...
basicly you load a model, and an move the points (In the model) to where you want them.. Only thing is they have weird names, you you have to click the hide button, and see what dissaspears, and if it the right ting, click edit from and move the sliders to move the arms/legs etc :)

Anyway.. If you want, I could make up a simple anims for you, just IM me with what you would want it to look like.. And the model it is to go in (So I can make sure nothing it in the way etc.. You can load a background model, which is usefull for anims for gunners on static MGs etc :))

Or email me.. See profile :)
- Ben
Title: Re:feet wet pilots
Post by: Colonel_Klink on 25 Feb 2004, 20:45:44
@DBR_ONIX
Thanks for the offer. I don't have a problem making statics as mentioned. Basically I need some seated positions for the life raft that makes the guys look cold and tired :)
Title: Re:feet wet pilots
Post by: Colonel_Klink on 28 Feb 2004, 11:22:20
Not a bump for this thread, but rather a request:
I'm wanting to know what math is required for me to have the life rafts be dumped overboard. one gets put overboard on the port side, the other on the starboard. Setpos doesn't work satisfactory as depending upon the direction of the police launch the raft sometimes gets deposited unter the launch itself. I presume it is a cos and sin function that does this, but my old brain aint what it used to be.
Thanks
Title: Re:feet wet pilots
Post by: sa8gecko on 28 Feb 2004, 12:57:25
Quote
Not a bump for this thread, but rather a request:
I'm wanting to know what math is required for me to have the life rafts be dumped overboard. one gets put overboard on the port side, the other on the starboard. Setpos doesn't work satisfactory as depending upon the direction of the police launch the raft sometimes gets deposited unter the launch itself. I presume it is a cos and sin function that does this, but my old brain aint what it used to be.
Thanks

I'd like to stay away from trigonometry, so I'll tell you what I would
do if I were in your feet. I would try with a setvelocity command, with
very low components, with the z one slightly (0,2 or so) positive.
Then, since I believe your rafts weight something, the engine of
OFP would do the rest. Still, I haven't try this, so I can't assure
it'll work. Basically to set the others two components of the velocity
vector you take the main boat direction and then (this time trigonometry
is indispensable) you can use as x component the sine of the
direction+90 multiplied by a little factor, and the cosine of the direction
+90 for the y component multiplied for the same factor to dump the
raft at starboard, sine of direction-90 and cosine of direction-90
to dump the raft at portside.
I'm assuming that you are deleting the proxies on the main
boat and simulating a dump of the raft, not positioning the
raft directly in the water. If you can simulate the dump I
think it will look a lot better than simply put the raft in the
water.
I hope this works.

Title: Re:feet wet pilots
Post by: Colonel_Klink on 01 Mar 2004, 09:52:40
Will try that out sa8gecko .

Slow working at the moment but here is a couple of pics:
(http://www.dc3d.co.nz/Utopia/launch4.jpg)
(http://www.dc3d.co.nz/Utopia/launch5.jpg)

Title: Re:feet wet pilots
Post by: sa8gecko on 01 Mar 2004, 11:42:15
Those pics look really great, Colonel_Klink.