
Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Mar 26, 2009 05:52 AM
Msg. 1 of 3
I've looked everywhere, but can't find one that deals with vehicles in a race gametype.
I added a script which deals with normal vehicles...
(script continuous vtport
(if (= (volume_test_object vtport1_start v1) true) (object_teleport v1 vtport1_dest) ) (if (= (volume_test_object vtport1_start v2) true) (object_teleport v2 vtport1_dest) ) (if (= (volume_test_object vtport1_start v3) true) (object_teleport v3 vtport1_dest) ) (if (= (volume_test_object vtport1_start v4) true) (object_teleport v4 vtport1_dest) ) (if (= (volume_test_object vtport1_start v5) true) (object_teleport v5 vtport1_dest) ) (if (= (volume_test_object vtport1_start v6) true) (object_teleport v6 vtport1_dest) ) (if (= (volume_test_object vtport1_start v7) true) (object_teleport v7 vtport1_dest) ) (if (= (volume_test_object vtport1_start v8) true) (object_teleport v8 vtport1_dest) ) )
But this doesn't work in race gametype. How do I get my script to detect that a netgame_flag_race_vehicle has entered a trigger volume?
i tried...
(if (= (volume_test_object vtport1_start "netgame_flag_race_vehicle #1") true) (object_teleport "netgame_flag_race_vehicle #1" vtport1_dest) )
but Sapien says that "netgame_flag_race_vehicle #1" is not a valid object.
Please help. Cookies for best answer ;) Edited by Black Crypt on Mar 26, 2009 at 05:54 AM
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Mar 26, 2009 08:54 PM
Msg. 2 of 3
I'm not going to say it's impossible, but I will say it's impossible as far as I know. There's no way to refer to the vehicles spawned in race. Those vehicles are spawned from the globals, and so they don't have object names.
Even if a script spawned all of the named vehicles on startup so you could refer to them and use them instead of the Race vehicles, it would create useless client-side copies of each vehicle since the script would spawn vehicles regardless of whether the game is a server or a joined player (client). These copies aren't on the server-side, so they're just annoying obstacles to client-side players.
The only way to prevent the copying of these vehicles is to verify if the game is the server or not, and Race is the only game type where that can't be done since a named vehicle that is used to check whether you are server or not doesn't spawn by default. In this case, the vehicle has to spawn by default, or else it defeats the purpose of the script.
I'm not even sure if you can spawn the named vehicles in Race in the first place, because I've never tried it before. I'm pretty sure you could, but because of what I explained, there's too many factors that would prevent them being implemented correctly for a vehicle teleport script anyways.
So, I'm not saying it's impossible, but from what I know, it is. Edited by Me KS on Mar 26, 2009 at 08:56 PM
|

Black Crypt
Joined: Jun 30, 2008
Xfire : blackcrypt
|
Posted: Mar 29, 2009 09:17 AM
Msg. 3 of 3
Thanks for your reply, but I'm not gonna give up because my new race map really needs to have a vehicle teleport for it to work really well.
As you can probablt tell, I'm really new to scripting and i'd like to ask another question...
How do I get an effect to occur during the teleport? Scratch that I worked it out myself...
(effect_new "effect path and name" "name of flag where effect will appear")
But..how do i stop it from occuring more than once per use of teleport? It works, but it seems to happen lots of times each time I go through the teleport.
More posers ...
In the map dmt_racing, the guy who made it manages to...
a) spawn multiple vehicles at the start of a race gametype. b) 'teleport' a vehicle and driver to a safe point after driving off the cliffs.
So, it can be done, but I have no idea where to start :(
Any ideas Halomaps forum regulars? Edited by Black Crypt on Mar 29, 2009 at 10:08 PM Edited by Black Crypt on Mar 30, 2009 at 01:45 PM
|