GSC reference › Built-in
SetEntityOwner()
Built-in (engine)
Server
AI Called on: actor
Set an entity as the AI's owner. The owner will never be targeted.
Signature
<actor> SetEntityOwner(<entity>)
Called on an entity: actor SetEntityOwner(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| entity | Required | An entity for owner. |
Example (from Treyarch's docs)
self SetEntityOwner( vehicle_entity )
Real uses in BO3's scripts
Called 4 times in the decompiled scripts. A few, zombies first:
- scripts/zm/zm_moon.gsc, line 301
self setentityowner(owner); - scripts/shared/abilities/gadgets/_gadget_clone.gsc, line 672
clone setentityowner(player); - scripts/shared/ai/archetype_clone.gsc, line 160
clone setentityowner(cloneplayer); - scripts/mp/killstreaks/_dogs.gsc, line 324
self setentityowner(owner);
Related built-ins
- ClearEntityOwner()Clears an AI's entity owner.
- ClearEntityTarget()Clears an AI's entity target.
- SetEntityTarget()Set an entity as the AI's target.
- setgoalentity()Set this AI 's goal.
- IsThreateningMyProtectEntity()Returns true if the enemy is currently threatening my protect entity.
- GetEntityNumber()Get the entity number of the entity
- PlayRumbleOnEntity()Plays a rumble on the given entity.
- SetOwner()Sets the entity owner.
- ClearTargetEntity()Clears the current target for this vehicle or turret.
- MaySpawnEntity()
- IsEntity()Checks whether given variable is of type entity.
- GetOwner()Get an entity's owner
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).