
Xoronatus
Joined: Dec 6, 2010
Taking a break
|
Posted: Oct 9, 2011 12:38 PM
Msg. 1 of 5
Is there a way to swap an individual AI's weapons with a script? How about a biped's weapons using a script?
|

ally
Joined: Jun 23, 2010
Aye Ready
|
Posted: Oct 9, 2011 01:15 PM
Msg. 2 of 5
okay i would reckon no is the answer to that. never heard of a script for individual a.i weapons
but surely if you make a copy of the original tag and edit it then you could have that a.i use any other weapon.
would mean having a separate tag for each a.i tho the way i'm thinking about it.
ask kirby? Edited by ally on Oct 9, 2011 at 01:21 PM
|

Xoronatus
Joined: Dec 6, 2010
Taking a break
|
Posted: Oct 9, 2011 01:28 PM
Msg. 3 of 5
Quote: --- Original message by: ally
okay i would reckon no is the answer to that. never heard of a script for individual a.i weapons
but surely if you make a copy of the original tag and edit it then you could have that a.i use any other weapon.
would mean having a separate tag for each a.i tho the way i'm thinking about it.
ask kirby? Edited by ally on Oct 9, 2011 at 01:21 PM Alright, that works for me too, thanks.
|

kirby_422
Joined: Jan 22, 2006
Apparently public enemy number 1?
|
Posted: Oct 10, 2011 01:10 PM
Msg. 4 of 5
Without OS you have to swap the biped out for a brand new biped with the weapon you want. Even with the current builds of OS, you could only swap between the index of their already held weapons. There isnt any command to give AI weapons, I tried the (player_add_equipment <unit> <starting_profile> <boolean>) command, but I saw no change on the biped. Even though it asks for a unit, it seems to have to be a player (although it could of been giving them weapons as their secondary things I guess, I never checked into that)
You can attach and detach a switch to a biped, when the switch is toggled, make a biped with the weapon your currently holding, set the current bipeds health over to the new one, objects_attach and detach, then remove the old one, monitor that biped instead (you can just set a global variable of type biped to the current biped, that way, you can look for that variable name in scripts instead, and it would always be for the current biped) then the player_add_equipment. Only issue would be ammo and such. As previously stated, it would be easier doing it with non-moving bipeds since you don't need all the stuff to pay attention to where they are moving.
|

Spartan314
Joined: Aug 21, 2010
Former biped rigger & FP animator
|
Posted: Oct 10, 2011 03:37 PM
Msg. 5 of 5
Quote: --- Original message by: waffles i cant remember but i saw a video on youtube where somebody did this. i dont think the biped could move though... i wanna say its on gamma's channel. but im not sure. Hey I remember too! But I think it was AI. Since the marine's head was moving around.
|