
Mysterion
Joined: Aug 9, 2008
Nice shot, but too bad your @$$ just got SACKED!!!
|
Posted: Oct 30, 2010 11:58 AM
Msg. 1 of 9
When scripting a multiplayer map, how can you have it check to see if there are more than one player playing? I have a script that allows for unloading a pelican if you hit the "Q" flashlight key; however, if you are player 1 with two players, it does not unload the AI. (script continuous empty_red_marinepelican1 (begin (if (and (= (unit_get_current_flashlight_state rmp1) true) (= (vehicle_test_seat rmp1 P-pilot (unit (list_get (players) 0))) true) ) (begin (vehicle_unload rmp1 P-riderLF) (sleep 10) (vehicle_unload rmp1 P-riderRF) (sleep 10) (vehicle_unload rmp1 pelican-gunner) (sleep 10) (unit_enter_vehicle (unit (list_get (players) 0)) rmp1 P-pilot) (unit_set_desired_flashlight_state rmp1 false) (ai_migrate red_marineassault red_frontline) ) ) ) )
Since you are always "player 0" when playing by yourself, if you change sides it will not unload if you change the code to read as: (unit_enter_vehicle (unit (list_get (players) 1)) in order to get it to work with two players. Edited by Mysterion on Oct 30, 2010 at 11:59 AM
|
|
|

sargejohnson
Joined: Apr 20, 2009
Shall we play a game?
|
Posted: Oct 31, 2010 02:55 AM
Msg. 2 of 9
why would you need it to work with two or more players? Its not like the AI sync over the internet right?
|
|
|

Mysterion
Joined: Aug 9, 2008
Nice shot, but too bad your @$$ just got SACKED!!!
|
Posted: Oct 31, 2010 10:29 AM
Msg. 3 of 9
True, but when experimenting around on LAN, I was trying to see if I could get AI to unload from the pelican using my laptop PC as player 1 and my desktop as player 0. They load into the pelican just fine; however, they do not unload as with player 0.
Can a script be created where a single player spawns into a trigger volume on either team (by changing teams) it will identify that single player as player 0 or player 1?
|
|
|

DA_Ender
Joined: Oct 22, 2010
(ÐÄ)€ÑÐËR †h€ GËÑØÇÏÐDÊ
|
Posted: Oct 31, 2010 10:42 AM
Msg. 4 of 9
Quote: --- Original message by: Mysterion True, but when experimenting around on LAN, I was trying to see if I could get AI to unload from the pelican using my laptop PC as player 1 and my desktop as player 0. They load into the pelican just fine; however, they do not unload as with player 0.
Can a script be created where a single player spawns into a trigger volume on either team (by changing teams) it will identify that single player as player 0 or player 1? AI can sync over lan but it is still requires a gross amount of h4x. The game knows what players are what just by how many are in the server. first player in the server is 0, then 1, ect all in order of the order they joined the game. there is a script that queries all players (0-15) to check if any of those players are in a trigger volume as soon as something enters it, then responds with something (i use this script to kill the player any time they enter a certain trigger volume) and it syncs perfectly over the netcode and therefore locally on your lan
|
|
|

Mysterion
Joined: Aug 9, 2008
Nice shot, but too bad your @$$ just got SACKED!!!
|
Posted: Oct 31, 2010 02:09 PM
Msg. 5 of 9
Its my understanding that AI will never sync over LAN or over the internet, unless someone can modify the orginal source code. Unfortunately, with Microsoft holding the bag this will never happen.
|
|
|

DA_Ender
Joined: Oct 22, 2010
(ÐÄ)€ÑÐËR †h€ GËÑØÇÏÐDÊ
|
Posted: Oct 31, 2010 11:53 PM
Msg. 6 of 9
Quote: --- Original message by: Mysterion Its my understanding that AI will never sync over LAN or over the internet, unless someone can modify the orginal source code. Unfortunately, with Microsoft holding the bag this will never happen. Tiamat used biped death to sync AI's. He explained the basics of how he did it to me years ago. It was glitchy but it worked. I know it is possible with intense h4x.
|
|
|

Mysterion
Joined: Aug 9, 2008
Nice shot, but too bad your @$$ just got SACKED!!!
|
Posted: Nov 1, 2010 03:45 PM
Msg. 7 of 9
What the heck is H4X???
|
|
|

sargejohnson
Joined: Apr 20, 2009
Shall we play a game?
|
Posted: Nov 2, 2010 05:31 AM
Msg. 8 of 9
Quote: --- Original message by: Mysterion What the heck is H4X??? its the internet-speak equivalent of hacks, ie. some serious modding. And from memory, biped ai syncing works, but its glitchy and will lag a multi-ai game, so just take it that AI dont sync unless you love lag. Edited by sargejohnson on Nov 2, 2010 at 05:33 AM
|
|
|

Mysterion
Joined: Aug 9, 2008
Nice shot, but too bad your @$$ just got SACKED!!!
|
Posted: Nov 3, 2010 02:36 AM
Msg. 9 of 9
I am currently trying to remove dummy ai on the computer joining the server. I have ripped the script file from Truth and Recon, which places all ai after the 2nd player joins the game.
Have any suggestions?
|
|
|