Table of Contents

Class CartelGoon

Namespace
S1API.Cartel
Assembly
S1API.dll

Represents a cartel goon (enemy NPC) that can be spawned and controlled.

public class CartelGoon
Inheritance
CartelGoon
Inherited Members
Extension Methods

Properties

GameObject

The GameObject associated with this goon.

public GameObject GameObject { get; }

Property Value

GameObject

IsConscious

Whether this goon is still conscious (alive and not knocked out).

public bool IsConscious { get; }

Property Value

bool

IsSpawned

Whether this goon is currently spawned in the world.

public bool IsSpawned { get; }

Property Value

bool

Position

The current world position of this goon.

public Vector3 Position { get; }

Property Value

Vector3

Methods

Attack(IEntity)

Makes this goon attack a specific entity.

public void Attack(IEntity target)

Parameters

target IEntity

The target entity to attack.

AttackPlayer()

Makes this goon attack the local player.

public void AttackPlayer()

Despawn()

Despawns this goon, removing them from the world.

public void Despawn()

SetDefaultWeapon(string?)

Sets or clears the default weapon for this goon. Pass null to make them use fists.

public void SetDefaultWeapon(string? weaponAssetPath)

Parameters

weaponAssetPath string

The weapon asset path, or null for fists.

WarpTo(Vector3)

Teleports this goon to a specific world position.

public void WarpTo(Vector3 position)

Parameters

position Vector3

The target position.