
Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 11:35 AM
Msg. 1 of 18
i made a script to make players start in vehicles at the start of a map, now my question is: would this work, or would it be exceptioning? Here's the script:
(script startup placement (vehicle_load_magic cryo1 driver (list_get (players) 0)) (vehicle_load_magic cryo2 driver (list_get (players) 1)) (vehicle_load_magic cryo3 driver (list_get (players) 2)) (vehicle_load_magic cryo4 driver (list_get (players) 3)) (vehicle_load_magic cryo5 driver (list_get (players) 4)) (vehicle_load_magic cryo6 driver (list_get (players) 5)) (vehicle_load_magic cryo7 driver (list_get (players) 6)) (vehicle_load_magic cryo8 driver (list_get (players) 7)) (vehicle_load_magic cryo9 driver (list_get (players) 8)) (vehicle_load_magic cryo10 driver (list_get (players) 9)) (vehicle_load_magic cryo11 driver (list_get (players) 10)) (vehicle_load_magic cryo12 driver (list_get (players) 11)) (vehicle_load_magic cryo13 driver (list_get (players) 12)) (vehicle_load_magic cryo14 driver (list_get (players) 13)) (vehicle_load_magic cryo15 driver (list_get (players) 14)) (vehicle_load_magic cryo16 driver (list_get (players) 15)) )
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 13, 2008 12:34 PM
Msg. 2 of 18
Should work.. but the isue is.. when you continue a game over, not every player is still in there the moment the server starts.. you notice how it says over like a 3 second intervel "Welcome ____".. but you dont wana force people to keep on entering for 3 seconds.. (unless you keep that as a cinematic time period)
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Oct 13, 2008 12:45 PM
Msg. 3 of 18
No, this will not work, as this command does not properly sync. This means that the non-hosting players will successfully be in vehicles on the server, but they will see themselves more or less just standing on top of the cryotube but still on foot on their screens. If they try to move, they will be warped back to standing on top of the cryo tube constantly because on the server side they're in it.
Unless you don't care if every non-hosting player has to start the map in a laggy situation, this won't work. Edited by Me KS on Oct 13, 2008 at 12:45 PM
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 12:57 PM
Msg. 4 of 18
well, i compiled, and now when i start up my map, i just spawn on my spawnpoints, and not in the cryotubes.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Oct 13, 2008 01:04 PM
Msg. 5 of 18
might need to use (unit (list_get (players) x)))
Perhaps you can do this with scenery instead, by attaching the player, running the animations for him getting out, and the cryo opening, and then detaching the player. A scenery cryo could probably use the same model, collision, and animations as the vehicle does
Edited by bobbysoon on Oct 13, 2008 at 01:06 PM
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 01:07 PM
Msg. 6 of 18
so, do i have to compile that as a seperate script, or "merge" it into my first one?
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Oct 13, 2008 01:10 PM
Msg. 7 of 18
(vehicle_load_magic cryo1 driver (unit (list_get (players) x)))
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Oct 13, 2008 01:13 PM
Msg. 8 of 18
Quote: --- Original message by: Bokito well, i compiled, and now when i start up my map, i just spawn on my spawnpoints, and not in the cryotubes. The cyborg.biped doesn't have an "enter" animation for the cryotube (unit "CT-driver" in the animations tag), and you do need an enter animation for this to work, I believe. Also, bobbysoon, no, the argument there is "object_list", not "unit", so an object specification is all that's needed, since "list_get" returns an object. It's not the script. Edited by Me KS on Oct 13, 2008 at 01:14 PM
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 01:22 PM
Msg. 9 of 18
Yea, he other script didnt work, and to make the cryotubes enterable, i just used the warthog animations.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Oct 13, 2008 01:32 PM
Msg. 10 of 18
oops. I stand corrected
You need an enter anim to enter a vehicle. If the bip is attached to a scenery instead, you just need an exit anim, and a scripted exiting. Probably need to spawn unarmed to have arms at sides in the tube
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 01:35 PM
Msg. 11 of 18
I can enter the vehicle (with warthog animations), but what do i have to change again? it's getting so confusing with all these changes.
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Oct 13, 2008 01:44 PM
Msg. 12 of 18
I think you should make a new scenery using the vehicle's tags. That way, the player can be "seated" both server and client side. However Bungie did it in the a10 map, that's what you need to do. As a vehicle, it won't work so you'd need to wait for the player to respawn, cripple the player, attach him to the scenery cryo at the appropriate marker, run the animations for opening and exiting, detach, de-cripple, wait until he's dead, and do it all over again. I suggest a script continuous for each player
|
|
|

Bokito
Joined: Oct 31, 2007
Playing ODST since 09-21-09
|
Posted: Oct 13, 2008 01:55 PM
Msg. 13 of 18
Seeing that, it makes me think thats a hell lot of work, and a lot of scripting, am i right? Also, i thought animated scenery could do just 1 animation? Vehicles have more possibilities, correct me if i'm wrong.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Oct 13, 2008 03:16 PM
Msg. 14 of 18
Actually, bobbysoon's idea is better.
See, the problem with vehicles is that they're server-side only. A script running on a client-side instance of the game can't refer to a vehicle in a game even if it is clearly there, because the vehicle only exists on the server side and is only synced to the clients. This means that there's no way of synchronizing the loading of the players into their cryotubes, in your case.
But, what bobbysoon is saying is to make a scenery version of a cryotube, with scripted animations. Scenery isn't synced at all, but each client has their own instance of the scenery that can be referred to by that client's scripts, including the server itself. So, if the server were to attach a player to the cryotube scenery, and then the client attach the player to its own local instance of the same cryotube scenery, then there wouldn't be any server-client update conflicts because the player client-side will be in the exact same position as the player on the server-side........... *runs out of breath*
The only thing that can't be done like bobbysoon said, is to stick players in their cryotube every time they respawn. The reason is because there's no way to check for a player's death, since the (players) variable only lists living players. This means that if player #2 dies, then player #3 temporarily becomes player #2 (and then player #4 temporarily becomes player #3, etc. the whole list shifts to make up for this) until the original #2 respawns, and then the list shifts back to normal.
Besides, it looks like Bokito wanted to do this only on map start-up, so if that's the case, then checking for a player's death wouldn't have to happen and the scripting will be easier to do. On both server and client, each player would be forced to do the cryotube resting animation until all cryotube scenery tubes are opened simultaneously (with another scripted animation), and then players play the exit animation (by script as well) until it is done. At that point, all players, both server and client, are detached from the scenery, and free to move. It will all sync because both server and client will be running the same animations and positioning at the same time.
/long post
|
|
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 13, 2008 05:29 PM
Msg. 15 of 18
Quote: --- Original message by: bobbysoon You need an enter anim to enter a vehicle. (unit_enter_vehicle )puts the specified unit in the specified vehicle (in the named seat)it doesnt; it directly locates the player within the vehicle without waiting for em to enter (its acualy what they used in a10)
|
|
|

bobbysoon
Joined: Feb 1, 2007
|
Posted: Oct 13, 2008 05:31 PM
Msg. 16 of 18
if you put the player spawn points in a trigger volume, you can do a trigger volume test to find respawned players, and which team they're on
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Oct 13, 2008 06:03 PM
Msg. 17 of 18
Quote: --- Original message by: bobbysoon if you put the player spawn points in a trigger volume, you can do a trigger volume test to find respawned players, and which team they're on The only time the team indexes in the spawn points are actually given any attention is in CTF. Ever noticed how in slayer or other game types you alternate spawning sides? That's one effect of that. So, unless the game type is CTF, you won't be able to find what team they're on. Also, that's not a good idea, since any random player could walk into a spawn point and the script would count that as that player "respawning", so in the end, testing for death is still needed. Unless you isolate all spawn points into one area that can't be reached after spawn (e.g., spawn points high in the air, spawn points in a separate room in the level with teleporters under each one, etc.) But that seems a little extreme, doesn't it? Besides, once again, Bokito doesn't need the players to constantly respawn in a cryotube, and it seems very clumsy gameplay-wise to do that anyways, so why speculate about it? Quote: --- Original message by: Bokito i made a script to make players start in vehicles at the start of a map, now my question is: would this work, or would it be exceptioning? Here's the script: And kirby, I just tried that, and it does play the enter animation for any vehicle. Even if this is only because there is an enter animation and it would still work without it, that doesn't solve the syncing issue. So, a script on start-up using scenery cryotubes still seems like the best choice.
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Oct 14, 2008 07:59 AM
Msg. 18 of 18
i thought about using the vehicle in the charctar tag. but i think it would do alot problems like when 2 players get close to each other they die like they run over each other, and some problems with exiting...
|
|
|
| |
|
|
 |
|