A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Loading player into pelicans?

Author Topic: Loading player into pelicans? (10 messages, Page 1 of 1)
Moderators: Dennis

Dabouss 15x
Joined: Aug 9, 2016

Annnd Its Gone!


Posted: Apr 23, 2017 01:33 PM    Msg. 1 of 10       
So i've been trying to figure this out for a while but you know how in certain halo campaign levels the opening cutscene such as Assault on the control room starts the player in the pelican but then ejects the player starting the mission. so how do i do that What scripts do i use?


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Apr 23, 2017 01:43 PM    Msg. 2 of 10       
With the (unit_enter_vehicle) command.

But since there isn't really a good way to grab a player-character(outside of engine upgrades like OpenSauce) you'll have to use (unit (list_get (players) 0))) as your <unit> argument.

- - - - -

unit_enter_vehicle <unit> <vehicle> <string>

<string> refers to the seat name. You'll find those seat names in the vehicle tags. The seat name has to be in "quotation marks"
Edited by OrangeJuice on Apr 23, 2017 at 01:43 PM


Dabouss 15x
Joined: Aug 9, 2016

Annnd Its Gone!


Posted: Apr 23, 2017 01:45 PM    Msg. 3 of 10       
i tried it but when i try to compile the script in sapien it gives me an error

Here is the script i used: (unit_enter_vehicle (unit (list_get (players) 0))) zulu "P-riderLF")

did i do it right?
Edited by Dabouss 15x on Apr 23, 2017 at 01:48 PM


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Apr 23, 2017 02:12 PM    Msg. 4 of 10       
Yup, that's correct.

Since you're trying compile it, it really depends on when you want it to run.

Try declaring it as a startup script

like saaaay:

(Script startup "myScript"
(begin
___(script here in parenthesis)
___(script here in parenthesis)
___(script here in parenthesis)
___(script here in parenthesis)
___(...........)
)
)

And you'll spawn already in the pelican when the map loads
Edited by OrangeJuice on Apr 23, 2017 at 02:25 PM


Dabouss 15x
Joined: Aug 9, 2016

Annnd Its Gone!


Posted: Apr 23, 2017 02:19 PM    Msg. 5 of 10       
this is my full script im using

(script startup 1
(fade_in 0 0 0 50)
(unit_enter_vehicle (unit (list_get (players) 0))) zulu "P-riderLF")
(object_create_anew zulu)
(object_teleport zulu 1_play)
(recording_play zulu ext_a_pelican_in)
(sleep 680)
(recording_play_and_delete zulu ext_a_pelican_out)
(sleep 200)
)




this is the error im getting:

[scripts line 4] the "unit_enter_vehicle" call requires exactly 3 arguments
recompiling scripts after scenarios are merged.
[scripts line 1] this left parenthesis is unmatched.: (script startup 1
Edited by Dabouss 15x on Apr 23, 2017 at 03:10 PM


DeadHamster
Joined: Jun 8, 2014

https://discord.gg/Neu4EJM


Posted: Apr 23, 2017 03:25 PM    Msg. 6 of 10       
Use globals!

At the top of your scripts write

(global unit player1 (list_get (players) 0))


Now whenever you need a unit, you can just write player1 instead



Edit; but you have too many end parenthesis after unit

Delete one of the ) and it will compile. You have 3 ( and you have 4 )

Also (unit is not needed as the expression youre using is already returning that data type.
Edited by DeadHamster on Apr 23, 2017 at 03:29 PM


OrangeJuice
Joined: Jan 29, 2009

Documentation and debug.txt


Posted: Apr 23, 2017 03:30 PM    Msg. 7 of 10       
And you have one too many parenthesis:



edit: darn too late xD
Edited by OrangeJuice on Apr 23, 2017 at 03:31 PM


Dabouss 15x
Joined: Aug 9, 2016

Annnd Its Gone!


Posted: Apr 23, 2017 03:36 PM    Msg. 8 of 10       
can you give me an example using the template of my script?


DeadHamster
Joined: Jun 8, 2014

https://discord.gg/Neu4EJM


Posted: Apr 23, 2017 11:55 PM    Msg. 9 of 10       


(global unit p0 (unit (list_get (players) 0)))

(script startup pelicandrop
(fade_in 0 0 0 50)
(object_create_anew zulu) ;; Make sure to create before you put the player inside.
(unit_enter_vehicle p0 zulu "P-riderLF") ;;You had it the other way around.
(object_teleport zulu 1_play)
(recording_play zulu ext_a_pelican_in)
(sleep_until (= 0 (recording_time zulu)) 5) ;;This should sleep until zulu is done playing
(vehicle_unload zulu "P-riderLF") ; This will kick out the player from that seat.
(recording_play_and_delete zulu ext_a_pelican_out)
(sleep_until (= 0 (recording_time zulu)) 5)
)



Dabouss 15x
Joined: Aug 9, 2016

Annnd Its Gone!


Posted: Apr 30, 2017 12:56 PM    Msg. 10 of 10       
ok I tried that script. the animations work correctly but i'm not starting in the pelican.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 10:09 AM 156 ms.
A Halo Maps Website