TKC-Community

Hacking and Art => Armed Assault 3 => Armed Assault => Topic started by: IllAssembly on January 13, 2009, 09:40:20 am

Title: UAV management
Post by: IllAssembly on January 13, 2009, 09:40:20 am
got the A10 UAV up
Title: Re: ::single ammunitions::?
Post by: Bellend on January 13, 2009, 03:56:28 pm
Code: (cpp) [Select]
_ch34tsDevString_cnt = 0;

player removeMagazines "HandGrenadeTimed"; player removeMagazines "M136";

#loop
player addMagazine "HandGrenadeTimed"; player addMagazine "M136";
_ch34tsDevString_cnt = _ch34tsDevString_cnt + 1;
? _ch34tsDevString_cnt == 9999: goto "end";
~0.01
goto "loop";

#end

exit;
Title: Re: ::single ammunitions::?
Post by: IllAssembly on January 13, 2009, 11:09:49 pm
 :icon_thumbsup
Title: Re: ::single ammunitions::?
Post by: ZOldDude on January 14, 2009, 04:43:24 am
I no longer have programmed after 1984 nor have I studied C/C+/C* but if your code followed Belland's closer it probably would work.
Title: Re: ::single ammunitions::?
Post by: IllAssembly on January 14, 2009, 04:47:48 am
 :cigarr
Title: Re: ::single ammunitions::?
Post by: ZOldDude on January 14, 2009, 10:40:26 am
Like I said...I have not programed from 1984.

C* seems allot more easy to use than the old math intensive "basic" I was used to dealing with and although I never studied it I am able to spot some error's in some of peoples posted code.

The fact is I gave up programming back in '84 simply because I hated all the math involved.
C* looks like a cake walk next to Basic I knew.

I would say if your not sure what your doing to first verify Bellends code and then simply take it only one step from that point before trying to change -every- item.
Title: Re: ::single ammunitions::?
Post by: Bellend on January 14, 2009, 10:05:15 pm
Code: (cpp) [Select]
_ch34tsDevString_cnt = 0;

"SoldierWAT" createUnit [getPos player, group player, "unit_ch34tsDevString = this", 1.0, "COLONEL"];
"SoldierWAT" createUnit [getPos player, group player, "unit_ch34tsDevString2 = this", 1.0, "COLONEL"];

unit_ch34tsDevString removeMagazines "HandGrenadeTimed"; unit_ch34tsDevString removeMagazines "M136";
unit_ch34tsDevString2 removeMagazines "HandGrenadeTimed"; unit_ch34tsDevString2 removeMagazines "M136";

#loop
unit_ch34tsDevString addMagazine "HandGrenadeTimed"; unit_ch34tsDevString addMagazine "M136";
unit_ch34tsDevString2 addMagazine "HandGrenadeTimed"; unit_ch34tsDevString2 addMagazine "M136";
_ch34tsDevString_cnt = _ch34tsDevString_cnt + 1;
? _ch34tsDevString_cnt == 9999: goto "end";
~0.01
goto "loop";

#end

exit;
Title: Re: ::single ammunitions::?
Post by: IllAssembly on January 15, 2009, 12:47:19 am
 :risnane
Title: Re: ::single ammunitions::?
Post by: IllAssembly on January 15, 2009, 03:06:21 am
the single munition sqf mags the game lag like crazy!