User Tools

Site Tools


4rpl:commands:seteggorbdata

Index

SetEggOrbData

SetEggOrbData(<-eggOrOrb <-initData)

Description

Sets data on the supplied egg or orb.

The following key values must be fully lowercased.

The possible values in initTable are:

  • “payload” : The amount of creeper for the egg to carry. A float.
  • “moveto” : The location for the egg to move to. A Vector3.
  • “showpathline” : If the egg should draw a line to its moveTo position. A bool.
  • “showpathlinecolor” : The color of the pathLine, if any. A Vector4.
  • “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.
  • “attachedto” : Specifies the UID of another egg/orb 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.

:!: There isn't perfect symmetry between CreateOrb and CreateEgg. CreateEgg doesn't pay attention to “attachedto” or “attachedtoobj”. CreateOrb does. SetEggOrbData pays attention to “attachedto” but what it attaches to has to be another egg or orb (otherwise it ignores it). SetEggOrbData does not pay attention to “attachedtoobj” (for either an egg or org).

Examples

Table("payload" 100) ->data
SetEggOrbData(<-data)

Index

4rpl/commands/seteggorbdata.txt · Last modified: 2023/07/12 14:45 by Karsten75