Home   Help Search Login Register  

Author Topic: COC_boat  (Read 3575 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
COC_boat
« on: 31 Mar 2004, 18:42:58 »
This script allows you to board a boat or any other floatable vehicle when you are underwater. You need the COC_diver and OFP Resistance patched up to 1.91.

Little Bonus
- "splash & bubblesounds" when you're underwater.

Download the testmission
Copy & paste in browser
How 2 use this in your own mission.

Copy all sqs,ext + the sound folder with the ogg's in you own users\username\missions\missionname folder.
- Place a COC_diver or a unit equiped with the rebreather ("coc_lar7") and the COC_swimscript, (that swimscript is already in the COCdiver addon)
- Place a boat and name it.

Execute with
Quote
[<name of the boat>] exec "coc_boat.sqs"

Known issues :

- Sometimes the bubbling don't stop in time when you're out of the water or in the boat.
- Sometimes you got hurt when you quickly enter the water, I don't think it's caused by my script(s), I think it's an addon bug.Correct me if I'm wrong.
- I don't think it's MP compatible.

Blanco out.

**edit**
link updated





 
« Last Edit: 01 Apr 2004, 20:20:19 by Blanco »
Search or search or search before you ask.

Sniper_Kyle

  • Guest
Re:COC_boat
« Reply #1 on: 05 Apr 2004, 14:27:50 »
The demo mission needs that floating cessna plane  ::)

Cheers,
   Sniper_Kyle ;D

Offline Blanco

  • Former Staff
  • ****
Re:COC_boat
« Reply #2 on: 07 Apr 2004, 15:44:43 »
Yes, I saw that too, But I've fixed that a few hours later.
Download it again.  ;)
 
Search or search or search before you ask.

Commando

  • Guest
Re:COC_boat
« Reply #3 on: 09 Apr 2004, 15:23:06 »
Nice script but imo i think it would be much more intresting if it would work in multiplayer because me and my buds play mp most of the time in Mfcti, co-op and TDM and some other modes that i make up myself  ;D
Well the thing is that it would be extremely cool if it was possible to make boats be able to pick up divers  8) and useful .

Imagine a situation where a guy has to escape with a swim suit and 2 other guys are chasing him down with a mty bell206 with a mg and try to shoot in the water to kill him then suddenly a civilian speedboat comes along and picks up the diver and makes a fast get away  :D

junkie-xL

  • Guest
Re:COC_boat
« Reply #4 on: 09 Apr 2004, 17:17:02 »
hmm, everything we make something, people react: "cool, but could you get that to work in MP???"

I don't understand this

the MP servers I see in the browser are mostly playing plain dull effect- and addonless missions. I have never seen an MP mission using CoC addons. It is a waste of time to design MP missions with a lot of addons because people won't be able to connect immediately.

most likely people playing MP are not making missions themselves, so this is why this kind of questions keeps popping up

Offline Blanco

  • Former Staff
  • ****
Re:COC_boat
« Reply #5 on: 09 Apr 2004, 19:28:42 »
I don't know it works in MP, I didn't say it does'nt work in Mp, I didn't test it, because I can't test in MP

I've wrote this script for one of my own SP missions, be free to test or modify the script in/for MP, that's why I 've posted it here.

Here's the code without the bubbling and watersplashes, check it your yourself

The COC-Boat script...

Quote

_boat = _this select 0


; get the type class od the boat, needed for the getin script
shiptype = typeof _boat

#start
@!(player in _boat) && getpos player select 2 < -1

; Make sure the action only appear when the diver is close (4 meters) to the boat, decrease the distance when your boat is smaller, eg : _dis = 4 for Colonel Klink's zodiac

~2
_dis = 8

_checkarray = []
#loop
?vehicle player distance _boat < _dis && !(player in _checkarray) && alive _boat: GETINBOAT = vehicle player addaction ["Get in boat ride in back","getin.sqs"]; _checkarray = _checkarray + [player]
?(vehicle player distance _boat) > _dis: vehicle player removeaction GETINBOAT; _checkarray = _checkarray - [player]
~0.5
?player in _boat : vehicle player removeaction GETINBOAT; exit
?getpos player select 2 > -1 && !(player in _boat):vehicle player removeaction GETINBOAT; goto "start"
goto "loop"
exit

and the getin script...

Quote

; remove the action
vehicle player removeaction GETINBOAT
; disembark the COC_lar7SWM, the invisible COC_vehicle

player action ["eject",vehicle player]

@player == vehicle player && typeof vehicle player != "COC_lar7SWM"

; find the boat
_boat = nearestobject [player,shiptype]

; movein
player moveincargo _boat

@(player in _boat)
[_boat] exec "COC_boat.sqs"




 


Search or search or search before you ask.

Commando

  • Guest
Re:COC_boat
« Reply #6 on: 27 Apr 2004, 16:49:33 »
thx im gonna go and give it a try in the upcoming weekend hopefully if im not to busy  :P

BoNeCoLLeCToR

  • Guest
Re:COC_boat
« Reply #7 on: 29 May 2004, 22:07:41 »
I want to use the script in addon pbo file what must I change or how do I add this script to CoC diver config.cpp file so in mission editor I dont need to type to call script and not name the boats ???

Offline Blanco

  • Former Staff
  • ****
Re:COC_boat
« Reply #8 on: 01 Jun 2004, 22:08:48 »
hmmm, sorry I don't have any experience with addonmaking nor cpp writing.
But I think it's possible without naming the boat when you use the nearestobject command. But that's all in theory...

« Last Edit: 01 Jun 2004, 22:19:24 by Blanco »
Search or search or search before you ask.

BoNeCoLLeCToR

  • Guest
Re:COC_boat
« Reply #9 on: 02 Jun 2004, 01:53:25 »
Do I need to change something in the script you have or shall it work as it is for every boat ???
And I want to make the diver be able to board from water to close flying choppers too is it possible  ???

Offline Blanco

  • Former Staff
  • ****
Re:COC_boat
« Reply #10 on: 06 Jun 2004, 01:24:46 »
It should work for every boat but you may change the value of the _dis variable in the COC_boat script.  

Code: [Select]
Make sure the action only appear when the diver is close (4 meters) to the boat, decrease the distance when your boat is smaller, eg : _dis = 4 for Colonel Klink's zodiac

~2
_dis = 8


Aren't there any addons with inbuilt eventhandler script or something like that?
Mostly with "fired" eventhandlers I guess

Maybe you can do something with a "Getin" eventhandler?

I take a look

I think it should work for choppers (in SP) , not tested tho...
It's based on a typeof command so there are possiblities



« Last Edit: 06 Jun 2004, 03:36:55 by Blanco »
Search or search or search before you ask.

BoNeCoLLeCToR

  • Guest
Re:COC_boat
« Reply #11 on: 06 Jun 2004, 14:26:47 »
thx will try it ;)

BoNeCoLLeCToR

  • Guest
Re:COC_boat
« Reply #12 on: 06 Jun 2004, 18:47:52 »
It should work for every boat but you may change the value of the _dis variable in the COC_boat script.  

Code: [Select]
Make sure the action only appear when the diver is close (4 meters) to the boat, decrease the distance when your boat is smaller, eg : _dis = 4 for Colonel Klink's zodiac

~2
_dis = 8


Aren't there any addons with inbuilt eventhandler script or something like that?
Mostly with "fired" eventhandlers I guess

Maybe you can do something with a "Getin" eventhandler?

I take a look

I think it should work for choppers (in SP) , not tested tho...
It's based on a typeof command so there are possiblities





I think it should work with init eventhandler but not sure will play a bit with it

Offline Blanco

  • Former Staff
  • ****
Re:COC_boat
« Reply #13 on: 08 Jun 2004, 17:32:26 »
hmmm, ...

After all,  I think you have to modify the cpp of the chopper, boat... instead of the COC diver...
Because the argument in my script is a vehicle, not the diver.


« Last Edit: 08 Jun 2004, 17:33:03 by Blanco »
Search or search or search before you ask.