Jump to content
gameboi

More scripting woes: countSide half working

Recommended Posts

I placed an independent near a gun called Mk1. In debud console I do this:

GUER countSide nearestObjects [Mk1,["Man"], 20];

It returns nothing.

So I tried this:

side (nearestObjects [Mk1,["Man"], 20] select 0);

It returns GUER. So far so good. Then I did this (substituting GUER with code):

(side (nearestObjects [Mk1,["Man"], 20] select 0)) countSide nearestObjects [Mk1,["Man"], 20];

Now it returs 1, which is correct. Why the hay doesn't the first line work? You'd think it should work.

Share this post


Link to post
Share on other sites

This will work:

independent countSide nearestObjects [Mk1,["Man"], 20];

Not exactly sure why though.

Share this post


Link to post
Share on other sites

This will work:

independent countSide nearestObjects [Mk1,["Man"], 20];

Not exactly sure why though.

Thanks, I made a ticket, but I just heard that RHS doesn't officially support the insurgents in the mod. It seems to be a third party thing.

Share this post


Link to post
Share on other sites

GUER is not the side, its the string name for the side resistance. independent is not a side. its a global variable of the resistance side.

 

use resistance instead

Share this post


Link to post
Share on other sites

GUER is not the side, its the string name for the side resistance. independent is not a side. its a global variable of the resistance side.

 

use resistance instead

Thanks. How could I have known? Is there a command for that too?

Share this post


Link to post
Share on other sites

Thanks. How could I have known? Is there a command for that too?

 

I think your best bet is to go through some published community scenarios and see how everything works and is put together. You'll learn a lot faster that way than starting from square 1 with editor + wiki.

 

As for this issue ...

 

Use these:

 

east

west

resistance

civilian

 

ignore/do not use these:

 

opfor

blufor

guer

independent

civ

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

×