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 Technical / Map Design »Vehicles won't spawn in-game

Author Topic: Vehicles won't spawn in-game (7 messages, Page 1 of 1)
Moderators: Dennis

Shade117 pro
Joined: Jul 2, 2009

Yeah bro (xfire: blue117pro) I can make cubemaps


Posted: Jul 5, 2009 03:42 PM    Msg. 1 of 7       
ummm they arent spawning... like in-game. they just arent there, ive tried slayer, team slayer, & CTF but the vehicles still dont spawn but they do in sapien. Can any please help out. It would be appreciated.


chrisk123999
Joined: Aug 10, 2008

=CE= Chris [Captain] [=]


Posted: Jul 5, 2009 03:57 PM    Msg. 2 of 7       
Are they in your globals?


Shade117 pro
Joined: Jul 2, 2009

Yeah bro (xfire: blue117pro) I can make cubemaps


Posted: Jul 6, 2009 02:07 AM    Msg. 3 of 7       
yes... but the map works but not the vehicles...


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: Jul 6, 2009 02:34 AM    Msg. 4 of 7       
1) What kind of vehicles were they?

2) Is this SP or MP?

3) If this is MP, were they set to spawn on gametypes slayer, CTF and king?

4) Are you sure they are in your globals? Check.


Shade117 pro
Joined: Jul 2, 2009

Yeah bro (xfire: blue117pro) I can make cubemaps


Posted: Jul 6, 2009 04:05 AM    Msg. 5 of 7       
HEY POLAMME WUTS UP!! nice tuts! :)
okay they all the vehicles are normal vehicles but except for 1 which i only edited the bitmap...
it is MP Yes i did set the gametypes, & they are in the globals.

& just in case, can a map can only have 6 different vehicles?


sargejohnson
Joined: Apr 20, 2009

Shall we play a game?


Posted: Jul 6, 2009 04:36 AM    Msg. 6 of 7       
no, but that can only be done via scripting.

here's Me KS's tutorial that he posted on my topic once. (he solved it)

Quote: --- Original message by: Me KS
1. In your "Vehicles" list in Sapien, place a vehicle spawn point in a location where no player can go. Set the spawn point's vehicle type to "NONE" so no vehicle actually spawns there. This spawn point has to be the very first in the list of vehicles in Sapien.

The reason for this is all vehicles that the game considers "extra" are respawned to the first vehicle spawn point, no matter where their actual spawn points are. So we take advantage of that here.

2. Place a trigger volume (Game Data > Trigger Volumes) over this spawn point. Make sure the trigger volume is larger than the largest vehicle that you need a script to respawn. For example, if you have two scorpions, a hog, and a ghost, make the trigger volume at least as large as the scorpion. Name this trigger volume whatever you want.

This will be used to check to see when the vehicle has respawned to the first spawn point, then re-create it that very same moment to bring it back to its true spawn point.

3. Also, place a new vehicle of any type (hog, ghost, anything. Preferably something small) in either the same area (away from the trigger volume) or in a different location that the player can't go to. Name this vehicle "host_check", and set it to spawn BY DEFAULT in all game types. Make sure it's a vehicle that is in the globals so it'll spawn by itself, otherwise this won't work.

This is to check in the scripts to make sure the game doing all of this is the server. It works because the vehicles are server-side only, and so if you try to check for a vehicle's existence and you're not the server, it will say the vehicle doesn't exist, which lets us check and see who's the server. If we allowed the script to run without making sure only the server is making the changes, then there would be two vehicles spawned for each spawn point: one is the real server-side one, and the other is a client-side copy that doesn't exist on the server and so is just useless and annoying to players.

4. With all of the vehicles that you need scripted in, place them where you need them and set their properties as usual. Just remember to give each one a unique name for the scripts.

5. Then, you're ready to actually do the script:

(global boolean server 0)
(script startup vehicles
(if
(>= (unit_get_health host_check) 0)
(set server 1) )
(if
(= server 1)
(begin
(object_create "first vehicle")
(object_create "second vehicle")
;; etc, repeat for each one ) ))
(script continuous respawn_stuff
(if
(= server 1)
(begin
(if
(volume_test_object "trigger volume name" "first vehicle") (object_create_anew "first vehicle") )
(if
(volume_test_object "trigger volume name" "second vehicle") (object_create_anew "second vehicle") )
;; repeat each of these (if)'s for each vehicle. Use copy-pasting to do it faster. )
(sleep_until (= 0 1)) ))


Just replace the things in "quotes" and compile, and then test.


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: Jul 6, 2009 08:41 AM    Msg. 7 of 7       
Quote: --- Original message by: sargejohnson
no, but that can only be done via scripting.

here's Me KS's tutorial that he posted on my topic once. (he solved it)

Quote: --- Original message by: Me KS
1. In your "Vehicles" list in Sapien, place a vehicle spawn point in a location where no player can go. Set the spawn point's vehicle type to "NONE" so no vehicle actually spawns there. This spawn point has to be the very first in the list of vehicles in Sapien.

The reason for this is all vehicles that the game considers "extra" are respawned to the first vehicle spawn point, no matter where their actual spawn points are. So we take advantage of that here.

2. Place a trigger volume (Game Data > Trigger Volumes) over this spawn point. Make sure the trigger volume is larger than the largest vehicle that you need a script to respawn. For example, if you have two scorpions, a hog, and a ghost, make the trigger volume at least as large as the scorpion. Name this trigger volume whatever you want.

This will be used to check to see when the vehicle has respawned to the first spawn point, then re-create it that very same moment to bring it back to its true spawn point.

3. Also, place a new vehicle of any type (hog, ghost, anything. Preferably something small) in either the same area (away from the trigger volume) or in a different location that the player can't go to. Name this vehicle "host_check", and set it to spawn BY DEFAULT in all game types. Make sure it's a vehicle that is in the globals so it'll spawn by itself, otherwise this won't work.

This is to check in the scripts to make sure the game doing all of this is the server. It works because the vehicles are server-side only, and so if you try to check for a vehicle's existence and you're not the server, it will say the vehicle doesn't exist, which lets us check and see who's the server. If we allowed the script to run without making sure only the server is making the changes, then there would be two vehicles spawned for each spawn point: one is the real server-side one, and the other is a client-side copy that doesn't exist on the server and so is just useless and annoying to players.

4. With all of the vehicles that you need scripted in, place them where you need them and set their properties as usual. Just remember to give each one a unique name for the scripts.

5. Then, you're ready to actually do the script:

(global boolean server 0)
(script startup vehicles
(if
(>= (unit_get_health host_check) 0)
(set server 1) )
(if
(= server 1)
(begin
(object_create "first vehicle")
(object_create "second vehicle")
;; etc, repeat for each one ) ))
(script continuous respawn_stuff
(if
(= server 1)
(begin
(if
(volume_test_object "trigger volume name" "first vehicle") (object_create_anew "first vehicle") )
(if
(volume_test_object "trigger volume name" "second vehicle") (object_create_anew "second vehicle") )
;; repeat each of these (if)'s for each vehicle. Use copy-pasting to do it faster. )
(sleep_until (= 0 1)) ))


Just replace the things in "quotes" and compile, and then test.


That is one way, but putting it in globals is always best. BtW, if it dosen't spawn with object_create_anew then it never will.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 7:00 PM 282 ms.
A Halo Maps Website