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 »spawning vehicles with object create script

Author Topic: spawning vehicles with object create script (3 messages, Page 1 of 1)
Moderators: Dennis

Yoda
Joined: Jan 30, 2011

Do or do not, there is no try


Posted: Apr 13, 2013 03:33 PM    Msg. 1 of 3       
I need to spawn vehicles in race mode with an script rather than the lame race spawn system. And I need the vehicles to respawn normally. Can anyone explain how to do this?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Apr 13, 2013 04:13 PM    Msg. 2 of 3       
Same vehicles that spawn in all other games, or special vehicles just for race? if you want race specific, first of all, you'll need to detect the game type. You can do this in a few ways, such as spawning the players in a special spawn room just for race, or a weapon that only spawns on race that automatically kills a biped, etc. Then, host testing will be slightly harder since you cannot just check a defaultly spawning vehicle. Instead, do the more annoying way of placing a vehicle in a testing room in a trigger volume. Have it create at startup, if it is in the trigger volume seconds after after spawn, it must be the hosts.. If it isnt, it must be a client vehicle that bounced off the hosts copy. PVS cameras will be required if its in its own cluster.
(Or, you can just use OS to ask if its race, and if they're host)

Anyways, you then use generic vehicle spawning scripts with respawn

(global boolean is_race false) ;;set this elsewhere like the above explanation says
(global boolean is_host false) ;;^^^^^^^^^^
(script continuous vehicle_respawn
(sleep_until (and is_race is_host) 10)
(if (volume_test_object respawn_trigg race_veh_1) (object_create_anew race_veh_1))
;;etc
)
(script startup setup
;;;;;;;;
;;Setup stuff here
;; ^^
;; ^^
;;;;;;;;;
(if (and is_host is_race) (object_create_anew_containing race_veh)
(sleep -1 vehicle_respawn))
)


Yoda
Joined: Jan 30, 2011

Do or do not, there is no try


Posted: Apr 13, 2013 04:32 PM    Msg. 3 of 3       
Thanks for your response.

Now I have a different question. I am trying to teleport a player that enters a specific trigger volume to a flag that I have placed somewhere else.

This is what I have, but it doesn't work.
(script continuous t0
(if (= (volume_test_object lava (list_get (players) 0) true)
(object_teleport (list_get (players) 0) flag4)
)
)


--------------------------------------------------------------------------------------------------
EDIT: nvm, we were just missing a right parenthesis. we got it now.
Edited by Yoda on Apr 13, 2013 at 04:37 PM
Edited by Yoda on Apr 13, 2013 at 04:38 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 6:09 PM 156 ms.
A Halo Maps Website