OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: TheGimp on 08 Jul 2006, 17:06:43
-
hi
i made a dm where the players have desert eagles when they respawn. I placed crates around the map with assualt rifles etc in it. Players will be at an advantage to the ai when they get beter weapons. Is there any way that ai can pick up a new weapon when they are out of bullets or near a crate?
thanks
-
Yes.
But it will involve a real big script, alternatively a number of scripts. It all depends on how complicated you want it to be. I'd almost suggest you learn scripting yourself and try to do it, rather than asking people to write the script for you. :) But if someone wants to, that's fine.
Basically, what would be needed is :
- a part that recognizes when any AI soldier is close to a crate
- a part that allows the AI soldier to recognize what weapons, if any, are present in the crate
- a part that executes the moving and animation to pick up the weapon
- parts that recognize lack of weapon/ammo, and facilitates a reammo sequence.
It doesn't necessarily need to be that complicated, but if you for instance have limited supplies of certain weapons, or if you want the AI to exchange their current weapon for a better one when given the chance, or any other kind of "advanced" behaviour...well. That takes some doing. And I have no idea how it works in MP anyway.
Ahem. Yes, well. :) Good luck, nonetheless!
/Wolfrug out