fuaZandroX modding reference

Actor action function

A_fua_Stick (int ptr = AAPTR_TRACER, int flags = 0, float x = 0, float y = 0, float z = 0)

A_fua_Stick

Availability

ZandroX only. Does not exist in Zandronum 3.2.

Usage

Sticks the caller to the actor ptr names, as a sticky projectile sticks to what it strikes, and returns whether it did. Any actor can be stuck this way but a player's body, projectile or not.

Parameters

  • ptr: the actor to stick to, an AAPTR_ pointer.
  • flags: any of
    • FUA_STICK_OFFSET: put it at (x, y, z) from the host first; without it, it sticks where it is.
    • FUA_STICK_RELATIVE: read x, y and z as forward, right and up of the host's facing, as A_Warp does; without it they are world-aligned.
    • FUA_STICK_TURNS: its offset and facing turn with the host, as +STICKFOLLOWANGLE does.
    • FUA_STICK_STATES: enter Stick.Actor (or Stick) as an impact would; without it, the caller stays in its state.
  • x, y, z: the offset FUA_STICK_OFFSET puts it at.

It is refused when there is no such actor, the caller is a player's body, or the host is stuck, through any chain of hosts, to the caller. A caller already stuck is moved to the new host. It rides its host as any stuck projectile does, and is lost as one is (Stick.Lost).

In a netgame the server decides it and tells its clients.

Examples

A halo that sits 48 above whoever spawned it, turning with them:

ACTOR StickyHalo
{
    Radius 4
    Height 4
    +NOINTERACTION
    States
    {
    Spawn:
        BAL1 A 0 NoDelay A_fua_Stick(AAPTR_MASTER, FUA_STICK_OFFSET | FUA_STICK_TURNS, 0, 0, 48)
        BAL1 A -1
        Stop
    Stick.Lost:
        Stop
    }
}

Spawned with A_SpawnItemEx("StickyHalo", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER).

See also