
Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 14, 2008 11:00 AM
Msg. 1 of 8
I was going to say that it could be possible with scripting, but then I realized that that isn't even possible. It's because you would need a way of determining the distance between the player and an AI biped, and there is no command that can do that. It's also not possible to change the weapons of any other bipeds besides player bipeds through scripts.
Although, you could create an identical AI of each type holding each weapon. Then, depending on what weapon the player is holding when he is swapping weapons, the AI holding the player's weapon is spawned, attached to the AI that the player is swapping weapons with, detached, and then the old AI is destroyed, creating the illusion that the AI swapped weapons.
But, without a way to determine the distance between the player and the AI biped, it's still not possible.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 14, 2008 02:12 PM
Msg. 2 of 8
I never said it was possible. I was just speculating. To answer your questions:
1. Have an hud_messages tag with a message for each of the weapons with this format: "Press "E" to swap for ally's <weapon being held>". Then, check in a script using "unit_has_weapon" to see which weapon the AI and the player are holding, and display the correct message for that purpose using "show_hud_help_text" and "hud_set_help_text". It would be have to be a lot of messages for all of the possible weapons though...
2. Again, "unit_has_weapon".
3. It can't actually be done, so just check which weapon the AI had and arm the player with it using a "Player Starting Profile" in the scenario and "player_add_equipment", and then do what I said in the above post to make the AI seem to get your weapon.
But, again, the only fault is distance checking, so that it knows when you can swap with the AI.
So, yes, it's not possible by the look of it, but only because of that one thing.
|
|
|

Dennis

Joined: Jan 27, 2005
"We are made of starstuff.” ― Carl Sagan
|
Posted: Apr 14, 2008 10:40 PM
Msg. 3 of 8
Quote: --- Original message by: EliteHunter any way i can assign a freindly AI to each player so its kinda like 2 vs 2 ?
AI' do not sync across the network. They operate on the local client PC So NO you can not get AI to play properly with another client connected. Edited by Dennis on Apr 14, 2008 at 10:40 PM
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 15, 2008 05:26 PM
Msg. 4 of 8
No they don't. Period. The only thing that synchronizes over the net code is the health and shield status of each biped (also meaning that whether it exists and whether it's dead is synchronized).
However, the position, what weapons are held, whether the biped is attached to AI, and everything else about AI bipeds does not synchronize.
When playing on a server hosting an AI map, if you ever see a biped that you can't kill, that's because the AI belonging to that biped is somewhere else on the server side. The only thing you can confirm when you see one of those bipeds is that there is a living AI somewhere on the server side. That's it though. The AI that you do see are your own local AI, which can't hurt you because they don't exist on the server side.
|
|
|

Dennis

Joined: Jan 27, 2005
"We are made of starstuff.” ― Carl Sagan
|
Posted: Apr 15, 2008 05:34 PM
Msg. 5 of 8
Quote: --- Original message by: EliteHunter yes they do..................... One of the immutable facts about Halo 1, Halo 2 and Halo CE is that "AI do not sync across the network." Believing otherwise is foolhardy. The gospel has been spoken. And it is True.
|
|
|

Dusinator
Joined: Mar 23, 2008
Abuser of dots and parenthesis.
|
Posted: Apr 15, 2008 06:46 PM
Msg. 6 of 8
Quote: --- Original message by: DennisQuote: --- Original message by: EliteHunter yes they do..................... One of the immutable facts about Halo 1, Halo 2 and Halo CE is that "AI do not sync across the network." Believing otherwise is foolhardy. The gospel has been spoken. And it is True. IMHO, the gospel sucks. =P
|
|
|

Flash44x
Joined: Jan 3, 2007
What would you have your arbiter do?
|
Posted: Apr 16, 2008 10:20 AM
Msg. 7 of 8
(script startup ai (unit_has_weapon (unit (list_get (ai_actors encount) 0)) weapons\needler\needler) (unit_has_weapon_readied (unit (list_get (ai_actors encount) 0)) weapons\needler\needler) )
im not sure it compiled succesfuly in sapien but dind try it ingame yet
Edited by Fbi Was For on Apr 16, 2008 at 10:29 AM
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Apr 16, 2008 12:30 PM
Msg. 8 of 8
It wouldn't work. You need an object_definition variable for each weapon reference, because the argument for those two commands is <object_definition>. So add this before any script:
(global object_definition needler weapons\needler\needler)
Then you would use "needler" as an argument instead of "weapons\needler\needler".
|
|
|