User Tools

Site Tools


4rpl:commands:createorb

Index

CreateOrb

CreateOrb(<-pos <-initData) ->orb

Description

Creates an orb at the specifid position. An orb is a blue jiggly ball of creeper. The init params control it's content, it initial velocity, and its behavior.
Extra information: Orbs deal 0.5 damage when directly damaging a non-impervious unit.
To clarify: The unit type is “airsacbubble”.
The possible values in initTable are:

  • “payload” : The amount of creeper for the orb to carry. A float.
  • “bounce” : Whether the orb bounces on the terrain. A bool.
  • “includepseudoterrain” : Whether the orb bounces on pseudoterrain (when bounce is set to true). A bool.
  • “bounceshield” : Whether the orb bounces on shields. A bool.
  • “creeperdamps” : If the motion of the orb is slowed when in creeper. A bool.
  • “destroywhenstill” : If the orb should auto destroy when it comes to rest. A bool.
  • “destroywhendrytime” : If -1, then the orb will not auto destroy when out of the creeper. Otherwise, the nubmer of frames that it must be dry before it auto destroys. An Int.
  • “releaseondestroy” : If the orb releases its payload when destroyed by a sniper. A Bool.
  • “velocity” : The initial velocity of the orb. A Vector3.
  • “maxspeed” : The maximim speed the orb can move. Defaults to 1.
  • “attachedto” : Specifies the UID of another egg/orb/unit to create an attachment to. An attachment is a link that binds the orbs together
  • “attachedtoobj” : Specifies the name of the obj to use on the attachedto object. Only works if attachedto points to a cmod unit.

Examples

Table("payload" 100
      "bounce" true
      "bounceshield" true
      "creeperdamps" false
      "destroywhenstill" false
      "destroywhendrytime" 60
      "releaseondestroy" false
      "velocity" V3(RandFloat 0.5 - 0.1 * 0.5 RandFloat 0.5 - 0.1 *)) ->initData
CreateOrb(V3(100 20 100) <-initData) ->orb

Index

4rpl/commands/createorb.txt · Last modified: 2024/02/20 22:30 by LiteralNoob