
Posts
480
Respect
48Add +1
Forum Rank
Perk Hacker
Primary Group
Donator ♥
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Pretty sure the order in your map file - typically from the first entity that you added with that targetname to the last unless you delete one.
But in what scenario would you need to know the order?
Edit: if you delete one then it just moves down the array's index.
First enttiy in an array is always index 0, unless of course the array doesn't have anything in it.


![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
It's for my Easter egg, there's probably a better way to do it but this works too. Thanks.
Double Post Merge: October 22, 2015, 02:57:58 am
Update: Redid trigs in the order I wanted by recreating them all, did not work In the order they were placed.

stop = false;
current_node = ziplines[0]; //first entity
level.zipline_origins_1[level.zipline_origins_1.size] = ziplines[0].origin; //first info from entity
while(!stop)
{
next_node = getEnt(current_node.target,"targetname"); //get the next target
if(isDefined(next_node))
{
level.zipline_origins_1[level.zipline_origins_1.size] = next_node.origin + (0,0,-70);
current_node = next_node;
level.cleanup[level.cleanup.size] = current_node; //to delete enititys after
}
else
stop = true;
}![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
How does GetEntArray decide the order the items are put into the array? I need it to be a specific order and id rather not do it all manually.
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
myarray = [];
ent = getent("startent","targetname");//or other kvp
myarray[myarray.size] = ent;
while(isDefined(ent.target)){//or other kvp
ent = getent(ent.target,"targetname");//or other kvp
myarray[myarray.size] = ent;
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Thanks for all the help, I just took a video of activating all of them and moved them around to be correct. (That was before I noticed the replies) thanks though, this might come in handy later.
Who's answer should I mark as Best though I don't really think I should just mark mine