UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How to get an array of all dogs?

broken avatar :(
Created 7 years ago
by Chilltacular
0 Members and 1 Guest are viewing this topic.
2,467 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 December 2013
Last active: 7 years ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Signature
Jack of All Trades: Master of None
×
Chilltacular's Groups
Chilltacular's Contact & Social Links
I know you can get an array of all the zombies through GetAiSpeciesArray("axis", "all")

I was wondering if anyone knew how how to get an array of just dogs?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I know you can get an array of all the zombies through GetAiSpeciesArray("axis", "all")

I was wondering if anyone knew how how to get an array of just dogs?

The docs say:

Code Snippet
Plaintext

entity GetAISpeciesArray([team],[species])

[OPTIONAL] [team] a team name, either 'axis', 'allies', 'neutral', or 'all'. Defaults to 'all'.
[OPTIONAL] [species] species of AI to get, 'human', 'dog', 'robot' or 'all'. Defaults to 'human'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the AI
EXAMPLE: aiarray = GetAISpeciesArray( "axis", "all" )

So I would assume:
Code Snippet
Plaintext
dogs = GetAISpeciesArray( "axis", "dog" );
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 December 2013
Last active: 7 years ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Chilltacular's Groups
Chilltacular's Contact & Social Links
Oh thanks. Where could I find the documentation for all that?

Double Post Merge: February 22, 2017, 05:30:05 am
The docs say:

Code Snippet
Plaintext

entity GetAISpeciesArray([team],[species])

[OPTIONAL] [team] a team name, either 'axis', 'allies', 'neutral', or 'all'. Defaults to 'all'.
[OPTIONAL] [species] species of AI to get, 'human', 'dog', 'robot' or 'all'. Defaults to 'human'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the AI
EXAMPLE: aiarray = GetAISpeciesArray( "axis", "all" )

So I would assume:
Code Snippet
Plaintext
dogs = GetAISpeciesArray( "axis", "dog" );

That didn't work either for some reason. I looked at the docs and I couldn't find anything else besides GetAiArray(name, key) which worked for zombies using GetAiArray("zombie", "targetname") But I couldn't find anyway to do that with dogs.
Last Edit: February 22, 2017, 05:30:05 am by Chilltacular
Marked as best answer by Chilltacular 7 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I haven't tried, but will when I get some time. Until then...
I guess you could get an array of all and add each dog to another array, but I'm sure that or some other way should work.

Code Snippet
Plaintext
function GetDogs()
{
    enemies = GetAiSpeciesArray( level.zombie_team, "all" );
    dogs = [];
    foreach(enemy in enemies)
    {
        if(isdefined(enemy.isdog) && enemy.isdog)
        {
            dogs[dogs.size] = enemy;
        }
    }
    return dogs;
}

Unless your trying to get an array of the dog spawners?
Last Edit: February 22, 2017, 02:41:55 pm by MakeCents

 
Loading ...