Home   Help Search Login Register  

Author Topic: Mid Air Pickup????  (Read 2013 times)

0 Members and 2 Guests are viewing this topic.

Hybrid

  • Guest
Mid Air Pickup????
« on: 31 Aug 2002, 04:58:53 »
                                     Hi How yah.
Well ive got a question that ive been working on all day. Well.. What im doing is combining a Halo script with a script of my own to allow players to enter vehicles in mid air. Well it all works fine except one thing. You can enter the vehicle from any point on the map. I would like it to be so that you have to be within a certain distance Ex: 5 m of the chopper. Well i hope someone can answer this. Thanks.

Cedaie

  • Guest
Re:Mid Air Pickup????
« Reply #1 on: 31 Aug 2002, 05:18:49 »
in a script called getin.sqs write:

_x  = _this select 0
_x  = _this select 1
_x  = _this select 2
#loop
?(_x distance helo > 5):goto "pickup"
goto "loop"
#pickup
_x moveincargo helo
#check
? (_x in helo):goto "boom"
goto "Check"
#boom
Helo setdammage 1
~1
Cedaie setmimic "smile"
; ;D
 
in an init field, type the arrays of the people you want to enter ex:

{player,Bob,Bob2] exec "getin.sqs"
« Last Edit: 31 Aug 2002, 05:27:19 by Cedaie »

Hybrid

  • Guest
Re:Mid Air Pickup???? :help:
« Reply #2 on: 31 Aug 2002, 05:26:53 »
I want the player to be able to activate this by him/herself by using the action menu. What you described would not allow that i think. Any other suggestions.?????? :beat: :gunman: :help: :help: :help:

Cedaie

  • Guest
Re:Mid Air Pickup????
« Reply #3 on: 31 Aug 2002, 05:28:00 »
yeh here i go..

In players init field
[] exec "check.sqs"

In check.sqs
#loop
?not(player distance helo > 30):goto "run"
goto "loop"

#run
player addaction ["get in chopper","getin.sqs"]
exit
in getin.sqs write
#run2
"_x moveincargo helo" foreach units group player
?(player in helo):goto "final"
goto "run2"
#final
player removeaction 0
exit

Hope it works ;)
« Last Edit: 31 Aug 2002, 05:56:28 by Cedaie »

Cedaie

  • Guest
Re:Mid Air Pickup????
« Reply #4 on: 31 Aug 2002, 05:46:16 »
I wonder if you can arguement a label

[#labelname] exec "script.sqs"

ans somehow that would pass everything below it, that'd be cool, 5 sqs in one!
« Last Edit: 31 Aug 2002, 05:47:23 by Cedaie »

Hybrid

  • Guest
Re:Mid Air Pickup????
« Reply #5 on: 31 Aug 2002, 06:03:06 »
Sry but i cant get it to work. Well the player enters the chopper but he can do it from anywhere on the map not just when hes close to the bird itself. Any other suggestions. ???? ??? ???

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Mid Air Pickup????
« Reply #6 on: 31 Aug 2002, 06:04:25 »
@ Cedaie :
u can pass a special name 4 each labal nd check if somthin is da name like dat

_label = _this select 0

? _label == "home" : goto "home"
? _label == "work" : goto "work"

etc  ;D

LCD OUT
« Last Edit: 31 Aug 2002, 06:07:14 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Mid Air Pickup????
« Reply #7 on: 31 Aug 2002, 06:48:33 »
I wonder if you can arguement a label

[#labelname] exec "script.sqs"

ans somehow that would pass everything below it, that'd be cool, 5 sqs in one!

You sure can... I use this in every single mission I make... I generally have one script for all my cutscenes (including intro and outros), and one for all my radio chatter/special event scripting. They can generally get as large as 25kb!
The first part of the script looks something like this:

Code: [Select]
_call = _this select 0
goto _call
hint "Error in Radio.sqs"
exit

#boarding
unit1 sidechat "We're boarding now"
exit

#egress
(_this select 1) sidechat "We're getting out of here!"
exit

So using that as an example, I might have this line in the get in waypoint of unit1:
["boarding"] exec "Radio.sqs"

And this in the waypoint of a unit2, exiting the combat area:
["egress",unit2 ] exec "Radio.sqs"

Saves the need to have 50 or so scripts in a mission folder ;)

Cedaie

  • Guest
Re:Mid Air Pickup????
« Reply #8 on: 31 Aug 2002, 08:27:00 »
hehe, kewl! Sui!

and my script above DOES work, cuz I tested it, make sure the distance is 20 or more, otherwise it wont show

try distance of 60, 60 is best distance (change 30 to 60 ;))
« Last Edit: 31 Aug 2002, 08:35:26 by Cedaie »

Hybrid

  • Guest
Re:Mid Air Pickup????
« Reply #9 on: 31 Aug 2002, 16:16:28 »
Ok Ive got it working. But...... sometimes the player cant get out of the chopper or eject. And that could be  big problem. Any Ideas?

NVM I figured it out. I used 2 triggers to show the action and remove it and i shortened my script down to 1 line. Anyways thansk for the help.
« Last Edit: 31 Aug 2002, 16:54:55 by Hybrid »