Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
-J4F- Thunder666

max count of explosives ?

Recommended Posts

hi Guys,

how i can set the maximum amount of mines, explosives and so on for a unit ?

thx in advance

count Magazines player iskindOf " ? " > x

dosnt work :( , what must be the correct line ?

Edited by [J4F] Thunder666

Share this post


Link to post
Share on other sites

You mean so that a person cannot take more than certain amount even if there is a space for it? One way is to make a subclass of the main class ans limit it there (requires modding). Another way is to run a script check and remove excessive explosives. You can use Put and Take events for it (currently broken)

Share this post


Link to post
Share on other sites

Magazines player is an array, so I don't get what you are doing.

isKindof must be applied to a single object I think, so you should try to find a way to extract each magazines types from your array and then check if one corresponds to mines.

But I am not sure how the array will be, so you should make some tests. It could be something like [mag1,mag2,mag3,...] (each type of magazine is shown only once) or [mag1,mag1,mag1,mag2,mag3,mag3,mag4,...] (each magazine class is shown as many times as the number of magazines you carry). If it's the seconde case, you can use countype: https://community.bistudio.com/wiki/countType

Share this post


Link to post
Share on other sites
Sign in to follow this  

×