Jump to content
Sign in to follow this  
ralphwiggum

Scalar?

Recommended Posts

this is what I did to get return value called 'scalar'

hint format["%1", player countEnemy list Cr]

wher Cr is name of trigger set as "east once detected"

my goal was to count number of alive east soldiers(as west soldier) in the trigger are...any hints?

Share this post


Link to post
Share on other sites

Scalar means number. If you forget to name trigger, hint shows you word scalar instead of number.

If trigger is properly named your example works, but shows number of enemy units that are known for guarding units.

If you want to know how many enemy units are in alarm trigger Cr :

- make another trigger, same size and location as Cr

- name it Al, condition alarm, activation east once present

- in Cr : on activation alarm=true;hint format["%1",east countside list Al]

(It doesn't work when mission starts and in Cr are enemy units visible to guarding units.)

Share this post


Link to post
Share on other sites

I have encountered the same problem and it might happen when you try to list activating units before trigger is initialized. At least this is how I think it goes. So, if you try to place the hint for example to "init.sqs" or to trigger with condition "true" -> error message "scalar" happens.

Set Cr trigger to only set boolean someVariable to true on activation and another trigger with condition someVariable to print the hint.

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  

×