User Tools

Site Tools


4rpl:commands:createegg

This is an old revision of the document!


Index

CreateEgg

CreateEgg(<-pos <-initData) ->egg

Description

Creates an egg at the specified position. The init params control its content, its initial velocity, and its behavior. The egg's UID is pushed to the stack after this call. If the egg is not created (because of the egg limit), a value of -1 is returned. The possible values in initTable are:

  • “payload” : The amount of creeper for the egg to carry. A float.
  • “velocity” : The initial velocity of the orb. A Vector3.
  • “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.

Examples

Table("payload" 100
      "velocity" V3(RandFloat 0.5 - 0.1 * 0.5 RandFloat 0.5 - 0.1 *)) ->initData
CreateEgg(V3(100 20 100) <-initData) ->egg

Index

4rpl/commands/createegg.1630329411.txt.gz · Last modified: 2025/02/14 14:56 (external edit)