OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: vrbanec on 29 Jan 2005, 21:42:15
-
Ok, I found out nobody knows how to make ai reload with action menu.
Is there some alternative way to make enemy solider reload when I want him to and when he doesn't actually need to?
-
To be honest, i dont think there is.
You can SIMULATE this by using an action, but i dont think it can actually be done.
Rhys
-
hows about taking his ammo away then giving it back to him?? untested tho
-
I played around with this awhile ago and gave up, but I think it's worth trying. If I remember right, I think I got StonedSoldier's method to work somewhat - I could give them a few mags, but they didn't actually reload. I switched one to Player and saw that I sudden;y had some mags, but I had to physically slap a clip in. It could ahve been the way I was doing it, think it was a small script thru a trigger, and I'm not rerally a scripter.
-
Can't there be an action to do it?
man action ["Reload", "M16"]
Maybe... :P
-
There is apparently an action load magazine but nobody knows how it works or what it does. You could experiment with stuff like
loon1 action ["load magazine", "M16"]
or
loon1 action ["load magazine", 0, 0, "G36aMag"]
or
all variations thereon.
and see how you get on.
-
if there are so many problems doing it properly, why not cheat?
loon removemagazine "magazine_name"
loon playmove "CombatReloadMagazine"
loon addmagazine "magazine_name"
(from the comref on 'removemagazine' - "Note: you may create invalid combinations with this function. When doing so, application behaviour is undefined.")
as mentioned above, whether this actually reloads the magazine is debatable, but at least it'll look like it is ;)
-
I made it work and it looks okay. he has to reload when he looses all his magazines and then gets them back so I made it that way. it's lot of typing, but it works.
thanks to all.
-
Can you spell out exactly what you do to make it work? Bedcause my small brain has never been succeessful...thx