Raised This Month: $128 Target: $400

Get all childrens of entity

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-24-2021 , 08:55   Get all childrens of entity
Reply With Quote #1

PHP Code:
void LoopThroughAllEntityChildrens(int entity)
int child entity;
    while ((
child GetEntPropEnt(childProp_Data"m_hMoveChild")) != -1)
// do something with child here

int peer child;
        while ((
peer GetEntPropEnt(peerProp_Data"m_hMovePeer")) != -1)
// do something with child here


This code loops through all childrens of entity.
If we have something like this:

HTML Code:
	Trigger_Hurt (Func_Door is parent)
		Env_Laser (Trigger_Hurt is parent)
		Env_Spark (Trigger_Hurt is parent)
			Trigger_Push (Env_Spark is parent)
	Trigger_Multiple (Func_Door is parent)
We can retrieve all entities in this list and do something with them.

Last edited by Ilusion9; 01-24-2021 at 16:01.
Ilusion9 is offline
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-02-2021 , 20:59   Re: Get all childrens of entity
Reply With Quote #2

cool loop
Bacardi is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 12:08.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode