Jump to content
Sign in to follow this  
Thunder666

Reinforcement if...

Recommended Posts

hi,

i need a Reinforcement if my Group smaller then x Guys . How i can get the Group Size of my Group ?

thx in advance

Share this post


Link to post
Share on other sites

tvm ! :)

another Script Noob Question.

i need this as a own Condition for the Bon Arti.

radus = nearestObjects [player, ["uns_army_7arto","uns_army_7brto"], 5]

Someone can help please ?!

thx in advance.

Share this post


Link to post
Share on other sites

Not sure if this will work in a trigger, but try this:

condition:

(count (nearestObjects [player, ["uns_army_7arto","uns_army_7brto"], 5])) == 0

on act:

hint "there is 0 items there of the specified type";

Share this post


Link to post
Share on other sites

looks good but dosn`t work :( . maybe only a Syntax error ? Someone can check it please or give me a other Idea or Solution for the Condition. I need it really :). Condition must be Distance,Player(or Object) and Class.

thx Guys

Edited by Thunder666

Share this post


Link to post
Share on other sites

i just tested it, i asume you have no clue how this command works?

my post hinted that there were 0 objects then it would trigger, change name to whatever and make sure to change the classname/ParentClass to the correct type.

for example this trigger activates when there are a tractor or a predator drone within 100 meter of the player:

(count (nearestObjects [player, ["Tractor","MQ9PredatorB_US_EP1"], 100])) != 0

whats important for you is to get the parentClasses or classname correct and the last bit:

== 0 means there should be none to activate.

!= 0 means it should not be 0 to activate.

< 0 means it should be less than 0 to activate.

> 0 means it should be more than 0 to activate.

now find your number and trigger works, tested myself.

to easily find a classname of a single object paste this in its initline:

copyToClipboard format["%1",(typeOf this)]

now start mission, exit it and now use ctrl v to paste the classname, you need to have it inside quotes as seen above.

Share this post


Link to post
Share on other sites
i just tested it, i asume you have no clue how this command works?

hehe :) i know how it works but cant write the Syntax for a line like this.

So i tested it before ur second Post with exactly the same Class Names.

(count (nearestObjects [player, ["uns_army_7arto","uns_army_7brto"], 3])) > 0 and this dosnt work for me.

But now :yay::yay::yay: it works in a Trigger Condition and i can set a Variable true.:yay: Dont know why it wont work before.

It works not in the own condition of "Bon Arti"

//### define own conditions by replacing the 'true', ( e.g. _arti_cond_other = "!alive tank1 && !alive tank2"; )

_arti_cond_other = "(count (nearestObjects [player, ["uns_army_7arto","uns_army_7brto"], 3])) != 0";

But the Trigger Option is nearly the same Result and thats what i want ! I dont need longer Names for Radio Guys.:bounce3:

thank you so much Demonized !

P.S. al last NQ for today :), how i ask how much Players are at Map ?

Edited by Thunder666

Share this post


Link to post
Share on other sites
Dont know why it wont work

lol, yeah i get that too sometimes, i figure lack of sleep or to much of it is the reason whenever it happens. :)

how i ask how much Players are at Map ?

something like this in a trigger:

hint format["players on map is %1",({isPlayer _x} count playableUnits)];

if you dont have AI enabled, no playabaleUnits can be AI, then you only need:

hint format["player on map is %1",(count playableUnits)];

Share this post


Link to post
Share on other sites

u made my Day Guy :)

thx

hhmm so it must be >>

cntp = count playableUnits ??? (i need the players on map(Humans) :)

Edited by Thunder666

Share this post


Link to post
Share on other sites

yeah, if you ar not using AI on any of the editor placed playableUnits then wwhat you posted will return the number of players active, but if you do use AI, then it will count them aswell, and you would need the isPlayer part in previous post instead.

cntp = count playableUnits;

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  

×