09-19-2011, 17:28
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:
Examples:
First will take all grenades and second all destructibles, now an example of use(a bit more complete):
This will detonate all grenades in map. Another way of use, this time with turrets:
Thats it, have fun and
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