| OFP.Info |
OFP.info Forum Rules| armyof2 |
Posted: December 06, 2007 06:21
|
|
New Member ![]() Group: Members Posts: 77 Member No.: 8322 Joined: August 08, 2006 |
Hey all, anybody got a script to give AI unlimited ammo? Need it for a mission with lots of shooting (at invisible targets) but they always run out of ammo...
Thanks. -------------------- OFP will never die.
USMC-"WE STOLE THE EAGLE FROM THE AIR FORCE, THE ANCHOR FROM THE NAVY AND THE ROPE FROM THE ARMY. ON THE SEVENTH DAY WHILE GOD RESTED, WE OVERRAN HIS PERIMETER, STOLE THE GLOBE AND WE'VE BEEN RUNNING THE WHOLE SHOW EVER SINCE." |
|
|
| SaS TrooP |
Posted: December 06, 2007 16:57
|
||||
|
Lazy OFP fan ;) ![]() ![]() Group: Members Posts: 274 Member No.: 9568 Joined: December 21, 2006 |
Just write something like this:
OK, I havent got sure its working, caue I wasnt using it for long time. Listen: Just modify: 1. _unit = name of the soldier 2. WeaponName = name of the weapon e.g "g36a" 3. Magazinename = magazine name e.g. "g36amag"; 4. time = type there a time. For example 5 or 259820986. Those are seconds, so you are able to change as many as you can. Dont forget about "~" sing, cause its very important -------------------- Removed according to the rules:
Yours were 700KB and around 150 pixels height |
||||
| Rellikki |
Posted: December 07, 2007 02:44
|
|
a.k.a. Serial Killer Group: OFP.info Team Posts: 1569 Member No.: 5233 Joined: January 04, 2005 |
That script is incorrect...
First, it goes to the "petla" section even if the player doesn't have the certain weapon - you didn't put any loop there to recheck it. Second, there's no point for the timing thing because you didn't put anything there to loop it. |
| JynX |
Posted: December 07, 2007 05:03
|
||||
|
Jehran Minister of Science & Technology ![]() ![]() Group: Members Posts: 171 Member No.: 8170 Joined: June 29, 2006 |
I mis linkers inexhaustible knoweldge of OFP scripting... WRONG!
errors: your loop wouldn't work. your not providing it with any information on what to do if the person hasn't got the weapon. your script could be tidied up a lot though the idea is right. Correction (I think) using example of a unit using an AK74SU because i love that gun in the game
when scripting to add stuff to units i find it best to write as if your telling the game: what the unit should have, and what to do if they dont have it. Whilst also making room for the event that they do have it. i'd describe how to make one script work for an entire group but its 3am, which i guess is my bed time lol hope that helps EDIT: fixed a bug in the magazine counting line This post has been edited by JynX on December 07, 2007 05:09 -------------------- LCPL Jakal A3-PM
-------------------------------------- LCpl Andrew "Jakal" Somerville 3rd Platoon Alpha Company -------------------------------------- Rotary Wing Transport Specialisation -------------------------------------- OFP.Info: JynX Xfire: asms BI Forum: ToadBall ArmA.info: JynX Ingame ArmA: ToadBall Ingame OFP: ToadBall/Jakal/JynX yet to decide which You are not Superman. (Freshly graduated recruits from Marine boot camp and all fighter pilots, especially, take note.) |
||||
| SaS TrooP |
Posted: December 07, 2007 22:10
|
||||
|
Lazy OFP fan ;) ![]() ![]() Group: Members Posts: 274 Member No.: 9568 Joined: December 21, 2006 |
??????????????????????? What? Co? Was? Can you repeat??? Mógłbyś powtórzyc??? [i dont know how its in german]Can you repeat?[/i dont know how its in german] -------------------- Removed according to the rules:
Yours were 700KB and around 150 pixels height |
||||
| Rellikki |
Posted: December 08, 2007 02:29
|
|
a.k.a. Serial Killer Group: OFP.info Team Posts: 1569 Member No.: 5233 Joined: January 04, 2005 |
Ok, that was an useless message, stop the spam. You should have pointed what you don't understand...
|
![]() |
![]() |