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:

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