Module KX_SCA_AddObjectActuator
|
|
1
2
3 from SCA_IActuator import *
4
6 """
7 Edit Object Actuator (in Add Object Mode)
8
9 @warning: An Add Object actuator will be ignored if at game start, the linked object doesn't exist
10 (or is empty) or the linked object is in an active layer.
11
12 This will genereate a warning in the console:
13
14 C{ERROR: GameObject I{OBName} has a AddObjectActuator I{ActuatorName} without object (in 'nonactive' layer)}
15 """
17 """
18 Sets the game object to add.
19
20 A copy of the object will be added to the scene when the actuator is activated.
21
22 If the object does not exist, this function is ignored.
23
24 obj can either be a L{KX_GameObject} or the name of an object.
25
26 @type obj: L{KX_GameObject} or string
27 """
29 """
30 Returns the name of the game object to be added.
31
32 Returns None if no game object has been assigned to be added.
33
34 @rtype: string
35 """
37 """
38 Sets the lifetime of added objects, in frames.
39
40 If time == 0, the object will last forever.
41
42 @type time: integer
43 @param time: The minimum value for time is 0.
44 """
46 """
47 Returns the lifetime of the added object, in frames.
48
49 @rtype: integer
50 """
52 """
53 Sets the initial linear velocity of added objects.
54
55 @type vx: float
56 @param vx: the x component of the initial linear velocity.
57 @type vy: float
58 @param vy: the y component of the initial linear velocity.
59 @type vz: float
60 @param vz: the z component of the initial linear velocity.
61 """
63 """
64 Returns the initial linear velocity of added objects.
65
66 @rtype: list [vx, vy, vz]
67 """
69 """
70 Returns the last object created by this actuator.
71
72 @rtype: L{KX_GameObject}
73 @return: A L{KX_GameObject} or None if no object has been created.
74 """
75