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 »Pelican dropping troops script

Author Topic: Pelican dropping troops script (3 messages, Page 1 of 1)
Moderators: Dennis

HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Nov 20, 2012 10:36 AM    Msg. 1 of 3       
Quote: --- Original message by: Rododo

I am trying to set up a script to make every passenger in a pelican get out of it when the player uses the zoom command.
(script continuous pelican
(if
(and

(= (player_action_test_zoom) true)
(= (vehicle_driver pelican) (list_get (players)0))
)
(begin
(vehicle_unload pelican rider)
(player_action_test_reset)
)
)
)

How the script should work: when the player is in the driver seat of the pelican named "pelican" and he uses the zoom command, everyone in the "rider" seat should get out.
What does the script actually do: 11.20.12 14:36:02

[pelican line 5] i expected a unit, but this function returns a object.: (list_get (players)0))
recompiling scripts after scenarios were merged.
[pelican line 3] this left parenthesis is unmatched.: (and

The problem is in that function that returns an object instead of an unit. The question is: how is it possible for it to return an object???
Edited by Rododo on Nov 20, 2012 at 08:49 AM
Edited by Rododo on Nov 20, 2012 at 08:53 AM

Use (unit <object>)
I. e,
(unit player0)
.
So, in your case, it would be this:

(unit (list_get (players)0)))


MoooseGuy
Joined: Aug 10, 2008

I Approve This Message.


Posted: Nov 20, 2012 11:25 AM    Msg. 2 of 3       
(script continuous pelican
(sleep_until
(and
(= (player_action_test_zoom) true)
(= (vehicle_driver pelican) (unit (list_get (players)0)))
)
)
(vehicle_unload pelican rider)
(player_action_test_reset)
)


This will work better IMO. Works when you need it to.
Edited by MoooseGuy on Nov 20, 2012 at 12:18 PM


Gravemind
Joined: Jul 28, 2009

The Age of Reclamation has begun.


Posted: Nov 21, 2012 06:10 AM    Msg. 3 of 3       
I made a (rather crappy) map that had that feature in it, I doubt I'd still have the script anywhere though. If you want you can download it and extract the script somehow, but I don't remember if it's protected or not.
http://hce.halomaps.org/index.cfm?fid=5111

Edit: found the script.
(script continuous droplessA
(sleep_until (= (vehicle_test_seat peli1 "P-pilot" (unit (list_get (players) 0))) false) 5)
(player_action_test_reset)
(sleep_until (= (vehicle_test_seat peli1 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
)

(script continuous droplessB
(sleep_until (= (vehicle_test_seat peli2 "P-pilot" (unit (list_get (players) 0))) false) 5)
(player_action_test_reset)
(sleep_until (= (vehicle_test_seat peli2 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
)

(script continuous droplessC
(sleep_until (= (vehicle_test_seat peli3 "P-pilot" (unit (list_get (players) 0))) false) 5)
(player_action_test_reset)
(sleep_until (= (vehicle_test_seat peli3 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
)

;===================================================================================================
(script continuous safe_drop
(player_action_test_reset)
(sleep 60)
)
;===================================================================================================

(script continuous dropoff_peli1
(sleep_until (= (vehicle_test_seat peli1 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
(sleep_until
(and
(= (vehicle_test_seat peli1 "P-pilot" (unit (list_get (players) 0))) true)
(= (player_action_test_zoom) true)
)
5)
(players_unzoom_all)
(player_action_test_reset)
(vehicle_unload peli1 "P-riderLF")
(vehicle_unload peli1 "P-riderLM")
(vehicle_unload peli1 "P-riderLB")
(vehicle_unload peli1 "P-riderLB01")
(vehicle_unload peli1 "P-riderLB02")
(vehicle_unload peli1 "P-riderRF")
(vehicle_unload peli1 "P-riderRM")
(vehicle_unload peli1 "P-riderRB")
(vehicle_unload peli1 "P-riderRB01")
(vehicle_unload peli1 "P-riderRB02")
)

(script continuous dropoff_peli2
(sleep_until (= (vehicle_test_seat peli2 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
(sleep_until
(and
(= (vehicle_test_seat peli2 "P-pilot" (unit (list_get (players) 0))) true)
(= (player_action_test_zoom) true)
)
5)
(players_unzoom_all)
(player_action_test_reset)
(vehicle_unload peli2 "P-riderLF")
(vehicle_unload peli2 "P-riderLM")
(vehicle_unload peli2 "P-riderLB")
(vehicle_unload peli2 "P-riderLB01")
(vehicle_unload peli2 "P-riderLB02")
(vehicle_unload peli2 "P-riderRF")
(vehicle_unload peli2 "P-riderRM")
(vehicle_unload peli2 "P-riderRB")
(vehicle_unload peli2 "P-riderRB01")
(vehicle_unload peli2 "P-riderRB02")
)

(script continuous dropoff_peli3
(sleep_until (= (vehicle_test_seat peli3 "P-pilot" (unit (list_get (players) 0))) true) 5)
(player_action_test_reset)
(sleep_until
(and
(= (vehicle_test_seat peli3 "P-pilot" (unit (list_get (players) 0))) true)
(= (player_action_test_zoom) true)
)
5)
(players_unzoom_all)
(player_action_test_reset)
(vehicle_unload peli3 "P-riderLF")
(vehicle_unload peli3 "P-riderLM")
(vehicle_unload peli3 "P-riderLB")
(vehicle_unload peli3 "P-riderLB01")
(vehicle_unload peli3 "P-riderLB02")
(vehicle_unload peli3 "P-riderRF")
(vehicle_unload peli3 "P-riderRM")
(vehicle_unload peli3 "P-riderRB")
(vehicle_unload peli3 "P-riderRB01")
(vehicle_unload peli3 "P-riderRB02")
)

Edited by Gravemind on Nov 21, 2012 at 06:16 AM

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 11:42 AM 172 ms.
A Halo Maps Website