Home   Help Search Login Register  

Author Topic: CoCdiver  (Read 751 times)

0 Members and 1 Guest are viewing this topic.

laulau

  • Guest
CoCdiver
« on: 23 Aug 2003, 14:54:53 »
hi everybody!! i'm new here.
there's something i don't like with CoC diver. when you're swimming you can't get in a boat. so i'm trying to make a script to do this. i'm making a mission where you're droped in the water by a chopper which also drop a zodiac. the script for this goes like this:



_helo= _this select 0
_helo flyInHeight 5
player animate ["goggles", 1]
~10
_helo animate ["Dvere1", 1]
~3
log1="Logic" CreateVehicle getpos _helo
~1
bato="CWKZodiacBO" CreateVehicle getPos log1
bato setPos [(getpos log1 select 0)+1, (getpos log1 select 1)+1, 0]
~1
player addAction ["board on boat", "passager.sqs"]
exit

so it allows the player to use the action "board on boat" to get in the zodiac while is swimming.

there's the scirpt executed by the action:

player setPos [(getpos log2 select 0), (getpos log2 select 1), 0]
player moveInCargo bato
exit

log2 is a game logic put on the ground, not in the water. so when i execute the action, everything goes well and my CoC diver board the boat. After that the action is still availble in the action menu. When i get out of the boat, the action disappears and i can't get in anymore.
and that's my problem, i would like to be able to get in the boat as many times as i want, not just once.
could someone give me a clue on how to do this?

thx for the coming answers!

Offline Blanco

  • Former Staff
  • ****
Re:CoCdiver
« Reply #1 on: 24 Aug 2003, 08:10:09 »
Quote
When i get out of the boat, the action disappears and i can't get in anymore.

When I get out... on land or in the water?

When it's in the water...
I think OFP-swimming is done with an invisible floating car -addon (just beneath the waterline) and maybe that's the problem. I don't know what the effect is with addaction when you jump from one vehicle to another

Anyways I want to know this too, cos I like the COC divers :)


Search or search or search before you ask.

laulau

  • Guest
Re:CoCdiver
« Reply #2 on: 24 Aug 2003, 12:01:24 »
so let me explain you. it's very strange. waiting for answers to my post i've tried again and again to make this script working. so the addAction works when i EJECT from the chopper, which is at 5 meters above the sea. i'm in the water and i have the action in the menu, so  i can use it. but it's after i board the boat that the problem appears:

so i board the boat while i'm in the water using the action. I'm in the boat and the action is still in the menu. i eject from the boat in the water and the action disappears. I succeed once yesterday night to get out the boat in the water and to keep the action usable. So it's kind of strange cause it seems that it can work.

It's certain that my problem is linked to the invisible car-addon created to swim but it's also certain that a few times my script worked. So is it just a bug, or did i have reached the right conditions to use it at those few times?

anyway, if the action menu can't work properly for this script i will use the radio to execute it even if it's not realistic. at least with the radio it perfectly works!

Mr.BoDean

  • Guest
Re:CoCdiver
« Reply #3 on: 25 Aug 2003, 23:32:19 »
Not completely sure, but I was chatting with Kaliyuga about this addon and he said they exploited the motorcycle -in -water properties , so it is more probable that you are on an invisible motorcycle. Maybe you need to unassignvehicle or something?
  I dunno ....just a thought.  :P

laulau

  • Guest
Re:CoCdiver
« Reply #4 on: 26 Aug 2003, 02:46:36 »
yeah you're right. you have to get out from the CoCdiver vehicle to be able to board the boat. so it's why i use "log2" in my script, a game logic on the ground, to move the unit out of the CoC vehicle and then i put the unit in the boat. i guess that the issue is to put the action "board the boat" via the CoC vehicle addon. But i'm not good enough at scripting to do it and it also means to create a new version of the CoC diver addon. so i stoped trying to do this via the action menu and i will use the radio. :(
anyway thx for your posts and your ideas.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:CoCdiver
« Reply #5 on: 26 Aug 2003, 04:21:54 »
It's just that i don't really get, why you wanna change
it from custom action to radio call.

What difference should that make on the functionality?

Or is it just that you don't get it to work to remove/readd
the custom action at the right time?

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:CoCdiver
« Reply #6 on: 26 Aug 2003, 04:28:20 »
Ah wait, i got it now;

yeah - you aren't handling the addaction/removeAction like
you should.

Think about this and compare it with your version:

boardit = player addAction ["board on boat", "passager.sqs"]

Now the action has a name, called: boardit

In the script, which boards the player then, you just need
to remove the action by:

player removeAction boardit

And then do a check in a repeating trigger for:

vehicle player == player OR vehicle player == CoC_LAR7SWM

onActivation: boardit = player addAction ["board on boat", "passager.sqs"]

hope this helps

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

laulau

  • Guest
Re:CoCdiver
« Reply #7 on: 26 Aug 2003, 13:32:05 »
thx. i will try this. i'll tell you if it works.

laulau

  • Guest
Re:CoCdiver
« Reply #8 on: 26 Aug 2003, 14:24:14 »
so i tried what you told me and it didn't work :(

BlAcKoP2003

  • Guest
Re:CoCdiver
« Reply #9 on: 26 Aug 2003, 15:51:34 »
i'd love to be able to drop out of a chopper into the water and board a boat, but i just can't see it happening :(.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:CoCdiver
« Reply #10 on: 26 Aug 2003, 16:16:00 »
OK, as soon as i'm back home from work i'll try to do
it myself and let you know about the result, or about
the "how to do" (if i get it to work  :) )

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:CoCdiver
« Reply #11 on: 08 Jan 2005, 16:32:06 »
How is this script coming?
I could use it in my mission.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."