Home   Help Search Login Register  

Author Topic: Multi Person Rappel  (Read 10709 times)

0 Members and 1 Guest are viewing this topic.

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Multi Person Rappel
« on: 04 Oct 2004, 02:00:40 »
Hey All-

See Last Post!

Addons Needed: snYpir's support pack

Get it  at http://www.ofpec.com/editors/spt_pack.php

Thanks for your help,

Blip  :joystick:
« Last Edit: 30 Oct 2004, 19:23:39 by Blip »
...NIGHT WALKER....

Bluelikeu

  • Guest
Re:Multi Person Rappel
« Reply #1 on: 04 Oct 2004, 07:20:34 »
If you made your own addon for the rope, maybe you forgot to fully wrap the textures around the object, and there is one side that is transparent. Another reason could be because the other two ropes are lined up on the same position. Try looking at that part of your script.

hope these might help

Thanks,
Bluelikeu

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #2 on: 04 Oct 2004, 17:47:04 »
Hey Bluelikeu-

It's actually snYpir's rope addon at the moment.  I went back and looked at the rope scripts and figured out the little bug and now I have four ropes working beautifully out the sides.  The rope's positions do need to be moved around a little though.  I also got the stupid AI helo to stop while the guys are unloading.  

Still trying to figure why the guys are dying when they hit the ground.  At the moment there is a setdammage to 0 once they hit.  Thus, the reason why it can only be AI.  Human players die.

And of course I still have nine scripts running.

Thanks Bluelikeu,

Blip  :joystick:

...NIGHT WALKER....

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Multi Person Rappel
« Reply #3 on: 12 Oct 2004, 22:02:56 »
As snYpir used Zayfords rappel script, you might find Zayford's topic on the subject of use. Look here. Gotta get back to work now. Good luck as I would like to see this completed!


                                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #4 on: 13 Oct 2004, 01:59:29 »
Hey Wadmann,

I came across Zayford's topic a few days after I made this post.  Technically using the Version7 scirpt in that thread I was able to get a working rappel.  Unfortunately, I haven't had much time to play with it lately.  The file I attached in my first post is pretty pathetic so don't bother with it.  I will see if I can finish an example mission soon.  
 
If anybody else has a better way to do this.  PLEASE jump in and speak up.  It would be great to get some experienced scripters in on this.

Later,

Blip  :joystick:
...NIGHT WALKER....

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #5 on: 13 Oct 2004, 02:51:56 »
Hey All-

Here's what I have been looking at as far as the basic script.  This uses Zayford's rappel and snYpir's work.

Still trying to figure out how to get a certain spot on the helo no matter which way the helo is facing so that the ropes stay in those spots.

Attached is the file for editor.

Blip  :joystick:
« Last Edit: 13 Oct 2004, 02:52:08 by Blip »
...NIGHT WALKER....

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #6 on: 30 Oct 2004, 06:44:03 »
IT WORKS!

Hey All-
It looks really good too!
Well here is a working multi-Rappel script

Includes:
-Four ropes out the sides of the helicopter.
-Each guy slides down there own rope, uses snYpir's switchmove animations and ropes.
-The helicopter can be moving while your units rappel.  In other words, no longer do you have to wait for the helicopter to come to a complete stop.

Let me know what you think.  Any bugs? Anything extra you want to be added?

Later,

Blip :joystick:

« Last Edit: 05 Nov 2004, 06:42:07 by Blip »
...NIGHT WALKER....

Offline Blanco

  • Former Staff
  • ****
Re:Multi Person Rappel
« Reply #7 on: 03 Nov 2004, 09:24:58 »
Really great!

A suggestion, I saw  the hint "starting rappel", so I guess the script is waiting for something.
Why dont you add an action or a radiochannel to the pilot, so he can the signal the men when it's safe to rope down.
When you fly too fast or too high,... well that's your fault,
But sometimes they rope down when I dont want them to do that.
It would be nice if they could wait for my signal.
Think about it!
 
It works really good when you play as pilot or rappeller.

Search or search or search before you ask.

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #8 on: 04 Nov 2004, 19:11:00 »
Hey Blanco-

I am glad you like it.   :cheers:

If you want to have control of when the units rappel out simply do the following:  
Say your helo is named chopper1 and you want to rappel guy1,guy2,guy3,guy4.

-In the waypoint on activation field:
Quote
chopper1 addaction ["Rappel Group","startrappel.sqs"]

-then make a script called startrappel.sqs and put the following in the script:
Quote
[chopper1,guy1,guy2,guy3,guy4] exec "Rappel\rappel.sqs"
~1
chopper1 removeaction 0
exit

I just tried it and it works beautifully.  So if your the pilot you can say when they rappel out.  Also, you can add any radio chatter you want into the startrappel.sqs.  

Later,

Blip  :joystick:
         
...NIGHT WALKER....

Offline Blanco

  • Former Staff
  • ****
Re:Multi Person Rappel
« Reply #9 on: 05 Nov 2004, 02:31:41 »
ok, great.

I have another idea, because right now the script is restricted to 4 men and it's a one time rappel.

Here it is : (only if the player is pilot)

When the script detects there are men in cargo, the action "start rappel" shows up, of not the action's removed.

Ok, that's the easy part...

I allready have the code for that :

Code: [Select]
_veh = _this select 0

_cargo = crew _veh
? (count crew _veh)<=2 && !isnull driver _veh && !isnull driver _veh : exit
_array = []
"if (_x != driver _veh && _x != gunner _veh) then {_array = _array + [_x]}" foreach _cargo
_cargo = _array
_cargo is an array with all the units in cargo.

?count _cargo != 0 : action shows up

Now the big problem is, in what order do they rappel?
How many soldiers on each rope?
Total number of men cargo can be anything, how do you control that?
 
I'm sure this is possible, but it won't be easy.

 
Search or search or search before you ask.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Multi Person Rappel
« Reply #10 on: 05 Nov 2004, 02:44:15 »
its easy to make any script work for unlimited amounts of (men in this case)
with some low level algebra...I'll check out the script and get back to you on that though  ;)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Multi Person Rappel
« Reply #11 on: 05 Nov 2004, 03:08:08 »
alright, that was easy all i did was edit the main rappel script that calls the other rappel scripts

here it is:
Code: [Select]
Hint "starting Rappel"
_helo = _this select 0
_men = _this select 1
_nMen = count _men
_man = _nMen + 1
_helo lockwp true
~2
_heloheight = getpos _helo select 2
_helo flyinheight 25

#chopheight
_height = getpos _helo select 2
? _height < 28 : goto "start"
~0.1
goto "chopheight"

#start
_man = (_man - 1)
_man1 = _men select (_nMen - _man)
[_man1,_helo] exec "Rappel\Rope1.sqs"
?_man == 1:goto "loop"
~0.3
_man = (_man - 1)
_man2 = _men select (_nMen - _man)
[_man2,_helo] exec "Rappel\Rope2.sqs"
?_man == 1:goto "loop"
~0.3
_man = (_man - 1)
_man3 = _men select (_nMen - _man)
[_man3,_helo] exec "Rappel\Rope3.sqs"
?_man == 1:goto "loop"
~0.5
_man = (_man - 1)
_man4 = _men select (_nMen - _man)
[_man4,_helo] exec "Rappel\Rope4.sqs"
?_man == 1:goto "loop"
goto "start"

#loop
?unlockhelo:goto "end"
~0.001
goto "loop"

#end
_helo flyinheight _heloheight
_helo lockwp false
exit

If you use this, the script would now be called like so:
Code: [Select]
[chopper1,[guy1,guy2,guy3,guy4,etc.]] exec "rappel.sqs"with what i changed you can have as many units rappel as you like  ;D

EDIT: I hope you don't mind me messing with your scripts and i apologize if you do...
« Last Edit: 05 Nov 2004, 03:16:49 by Triggerhappy »

Offline Blanco

  • Former Staff
  • ****
Re:Multi Person Rappel
« Reply #12 on: 05 Nov 2004, 03:48:20 »
yes, I know...

But with my idea you don't have to name noone or you don't have to call anybody to run the script, except the chopper.
It's dynamic.

Why naming units in cargo if you can get them via the crew command and a little scripting?



« Last Edit: 05 Nov 2004, 03:49:44 by Blanco »
Search or search or search before you ask.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Multi Person Rappel
« Reply #13 on: 05 Nov 2004, 03:52:50 »
so call the script i edited using the _cargo array you found in your code, its just a slight change in the way you set up the rappel script i changed

Offline Blip

  • Members
  • *
  • ...Old OFP FART...
Re:Multi Person Rappel
« Reply #14 on: 05 Nov 2004, 05:44:19 »
Hey All-

Alright, now we're talking.  I was having trouble setting up more than four guys rappeling out of the chopper, so thank you Trigger  :thumbsup:

As for changing or adding to the scripts, I don't mind at all.  Credit all goes back to the community anyway.

As for the script, I am trying out the new additions to the script now.  I will check back in a bit.  Looks good though!

edit:
Alright, I tried it with twelve guys.  The script Triggerhappy posted a few threads ago worked perfectly getting all the guys out of the chopper, however, it didn't wait for guys to reach the ground; thus there were 12 guys on four ropes at once.  So I played with the scripts alittle and made it so it checks for the guy on rope4 to complete his rappel before it starts the next group.  My top time for 12 guys out the chopper and on the ground was 28 seconds OFP time.

Anyway, there's still one problem.  If you want to rappel only six guys, the chopper doesn't leave cause its looking for a guy rappeling on rope 4.  So at the moment, it will work beautifully with 4,8, or 12 units but any of the others is shakey.

Grab the new folder below, with updated scripts including Triggers modifications.

Later,

Blip :joystick:
« Last Edit: 05 Nov 2004, 17:26:37 by Blip »
...NIGHT WALKER....