SWBF2-Lua-API icon indicating copy to clipboard operation
SWBF2-Lua-API copied to clipboard

no list of classes of entitys given for some functions

Open ghost opened this issue 8 years ago • 5 comments

i see that there isnt a list of all classes or entitys for some functions and there is no teamIndex cases like: cis vs rep= "cis"=1, "rep"=2 etc..

can this be added? thanks in advance

ghost avatar Apr 05 '17 08:04 ghost

What do you mean exactly? REP and CIS (as well as ALL and IMP) are simply variables with integer values.

marth8880 avatar Apr 05 '17 17:04 marth8880

well i mean wome functions need parameters that arent listed.

and i also mean there is no such thing like entitys.GetAll() to use in for k, v in next entitys.GetAll() and which an entity from all the entity is v.

ghost avatar Apr 06 '17 09:04 ghost

so it wouod be handy to have a list of all classes or a method to iterate over all entitys in the game (or bots or players) to use functions with it.

( i cant edit my comment. why puffin why?)

ghost avatar Apr 06 '17 09:04 ghost

Apologies for taking forever to get back to you on this.

well i mean wome functions need parameters that arent listed.

Which functions are missing which parameters?

and i also mean there is no such thing like entitys.GetAll() to use in for k, v in next entitys.GetAll() and which an entity from all the entity is v.

Like you said, this unfortunately does not exist within the game's scripting API.

so it wouod be handy to have a list of all classes or a method to iterate over all entitys in the game (or bots or players) to use functions with it.

You can sort of do this by maintaining an array of the alive units on each team with some combination of GetCharacterUnit, OnCharacterSpawn, and OnCharacterDeath.

marth8880 avatar Dec 27 '17 18:12 marth8880

with the functions that miss param args i mean functions based with entities, teams and classes of units. there are some classes given in the doc but no entities. the part about entities is very obscure because you don't know what the entities are or even the names of them. basically because there is no function that returns a table of all entities/classes to iterate over its very hard to do entity/class wise operations

ghost avatar Dec 30 '17 10:12 ghost