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 »vehicle spawn script

Author Topic: vehicle spawn script (2 messages, Page 1 of 1)
Moderators: Dennis

jawa
Joined: Jun 26, 2011

Utinni!


Posted: Jun 1, 2013 03:12 PM    Msg. 1 of 2       
I am trying to use a script to spawn vehicles in race. It works (sort of), but the client sees twice as many vehicles. However the client can only use the vehicles that the host sees. So I have these useless vehicles glitching up the map, and only the clients see them. Here is the script I last tried.

(script continuous vspawns
(begin
(if (= x 1) (sleep -1))
(if (= (volume_test_object spawner (list_get (players) 0)) true)
(begin
(object_create_anew v1)
(object_create_anew v2)
(object_create_anew v3)
(object_create_anew v4)
(object_create_anew v5)
(object_create_anew v6)
(set x 1)
)
)
)
)


I first tried using a simple script startup to automatically spawn them, but I started experimenting and ended up with this^. Nothing has changed though. I have also tried both object_create and object_create_anew.


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Jun 1, 2013 05:29 PM    Msg. 2 of 2       
Because nothing there is preventing the client from running the script. Instead of looking at X, you need to check a condition that syncs. Since your talking about race, your gonna have to have a sync room, where you have a trigger volume, and a named vehicle.

(global boolean is_host false)
(script startup setup
(object_create_anew host_testing)
(object_pvs_set_camera PVS_camera)
(sleep 15)
(if (volume_test_object test_trigg host_testing) (begin
(set is_host true)
(object_create_anew_containing v)
))
)

Place the vehicle, host_testing, in this seperate sync room (you dont want players going there). You place a trigger volume, test_trigg around it. Not too big, not too small (you can resize the trigger volume and use the volume_test in sapiens console.) The idea, is that those fake client vehicles bounce the real vehicle away, and they realize they arent the host because the vehicle isnt where it should be. The host however, will only have one vehicle there, so they will be recognized as host.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 8:23 AM 141 ms.
A Halo Maps Website