ItsMods

Full Version: GetEntArray
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

Ill explain now the GetEntArray command. What it does is to make an array with all the entities that are in a map that have something you searched for(a key or something like that). Works like this:

Code:
arrayname = GetEntArray("what you want","key you use");

Examples:

Code:
grenades = GetEntArray("grenade","classname");
destructibles = GetEntArray("destructible","targetname");

First will take all grenades and second all destructibles, now an example of use(a bit more complete):

Code:
grenades = GetEntArray("grenade","classname");
foreach(grenade in grenades)
grenade detonate();

This will detonate all grenades in map. Another way of use, this time with turrets:

Code:
turrets = GetEntArray("misc_turret","classname");
for(i=0;i<turrets.size;i++)
turrets[i] ShootTurret();

Thats it, have fun and OMA
You can use your own stuff with this aswell, just use

Code:
thing.targetname = "AWESUM";
thing.classname = "AWESUMZ";

bla = getEntArray( "AWESUM", "targetname" );
bla2 = getEntArray( "AWESUMZ", "classname" );
Omg stop making tutorials about what we all know
Fuu
(09-19-2011, 17:33)Rendflex Wrote: [ -> ]Omg stop making tutorials about what we all know
Fuu

orly Angry
@Yamato very useful for beginners, his Tutorials helps