Jump to content
Sign in to follow this  

Recommended Posts

can someone tech me how exactly call compile sintax and do his job???

in this example

_x_aware = (count (position _leader nearObjects ["BulletBase", 1000])) 
		- (count (position _leader nearObjects ["B_545x39_SD", 1000]))
		- (count (position _leader nearObjects ["B_556x45_SD", 1000]))
		- (count (position _leader nearObjects ["B_9x18_SD", 1000]))
		- (count (position _leader nearObjects ["B_9x19_SD", 1000]));

can i' call some _x_aware like this

_x_aware = call compile {(count (position...................)}; 

or

_x_aware = call compile {_x_aware = (count (position...................)};

Share this post


Link to post
Share on other sites

If you really really dont want to use scripts for more complex things.

Do this for example:

_x_aware = [] call compile "(count (position...................)";

May be inefficient as you compile those lines of code each time.

so

Somewhere else, in a units init for example(again if you chose not to use scripts)

MyBulletThing = compile "(count (position...................)";

then

_x_aware = [] call MyBulletThing;

Untested, but I think it'll work.

Share this post


Link to post
Share on other sites

then

_x_aware = [] call MyBulletThing;

Untested, but I think it'll work.

great!!

thanx!! thank you very mach))

can i add anothe one q in here????

while (_x_aware > 10) do {sleep 2; _x_aware = [] call MyBulletThing;};

where i can _x_aware call????

or

_x_aware = [] call MyBulletThing;
while (_x_aware > 10) do {sleep 2; };

or

while {(_x_aware = [] call MyBulletThing) > 10} do {sleep 2; };

Share this post


Link to post
Share on other sites

Np :)

For the last question.

I'm unsure what you want to do, but if you want to check a number in a while loop which may or may not change do.

while {([] call MyBulletThing) > 10} do {//Do stuff here;sleep 2;};

Edited by Taurus

Share this post


Link to post
Share on other sites

great!!

Glorify the scripting gurus!

All! Glorify Taurus-scripting guru!

Edited by nikita320106

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×