User Tools

Site Tools


4rpl:commands:createegg

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. 1)
  • “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

1)
Note: For “moveto” to function you have to use SetEggOrbData on the created Egg's UID. Otherwise the Egg will not move to the Vector3 location upon creation. Simply do SetEggOrbData(<-egg <-initData) after CreateEgg passes. -Found in CW4 v2.2.9
4rpl/commands/createegg.txt · Last modified: 2021/12/20 11:43 by Vertu