Class KX_IpoActuator (2.48)


Methods
getEnd setEnd
getForceIpoActsLocal setForceIpoActsLocal
getIpoAdd setIpoAdd
getIpoAsForce setIpoAsForce
getStart setProperty
getType setStart
set setType
 
Variables
---------- ----------
 
Constants
---------- ----------

Inherited Methods:  Class SCA_ILogicBrick
getExecutePriority setExecutePriority
getOwner ----------

Inherited Methods:  Class PyObjectPlus
isA ----------

Inherited Methods:  Class Value
getName ----------



Methods



getEnd

getEnd()

Returns the last frame the Ipo will play.

Return type:  float number

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# get last frame
last = act.getEnd()

getForceIpoActsLocal

getForceIpoActsLocal()

Returns whether or not force is applied using the object coordinates (local) or the world coordinates.

Return type:   Bool

1 = True = using local coordinates
2 = False = using world coordinates

Note:
It should be 0 = False.  But it returns 2 instead.

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# using local or world coordinates?
local = act.getForceIpoActsLocal()

getIpoAdd

getIpoAdd()

Returns the state of the Ipo Add button.

Ipo Add button:
Ipo (loc/rot/scale) retrieved is added to the sum of previous Ipos.

Return type:   Bool
1 = True
Ipo = Ipo +  sum of previous Ipos

2 = False
Ipo = Ipo 

Note:
It should be 0 = False.  But it returns 2 instead.

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# Ipo added to previous Ipos?
addIpo = act.getIpoAdd()

getIpoAsForce

getIpoAsForce()

Returns True if Ipo is being used as Force instead of displacement.

Return type:   Bool

1 = True
2 = False

Note:
It should be 0 = False.  But it returns 2 instead.

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# using Ipo as force?
force = act.getIpoAsForce()

getStart

getStart()

Returns the frame the Ipo starts playing.

Return type:  float

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# get starting frame
start = act.getStart()

getType

getType()

Returns the operation mode.

Return type:   integer

1 = Play
2 = Ping Pong
3 = Flipper
4 = Loop Stop
5 = Loop End
6 =
7 = Property

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# get operation mode
mode = act.getType()

set

set(mode, startframe, endframe, force)

Sets the ipo values.

mode:  
   Type:  string

"Play"
"PingPong"
"Flipper"
"LoopStop"
"LoopEnd"
"FromProp"

startframe:  
   Type:  integer

endframe:  
   Type:  integer

force:  
   Type:   bool

True or 1 = Use ipo as force instead of displacement
False or 0 = Use ipo as displacement

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# set the values
act.set("Play", 1, 21, False)

# use it
GameLogic.addActiveActuator(act, True)

setEnd

setEnd(endframe)

Sets the last frame to be played.

Type:  integer or float

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# last frame to be played
act.setEnd(11)

# use it
GameLogic.addActiveActuator(act, True)

setForceIpoActsLocal

setForceIpoActsLocal(local)

Sets whether or not the object axis (local) or world axis is used to apply the force.

local:
Type: bool

  True or 1 =  Force applied using local axis
  False or 0 = Force applied using world axis

Note:
getForceIpoActsLocal()
False returns 2
setForceIpoActsLocal(local)
2 sets it to True.  Not False

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# apply ipo as force using local axis
act.setForceIpoActsLocal(True)

# use it
GameLogic.addActiveActuator(act, True)

setIpoAdd

setIpoAdd(flag)

Sets the state of the Ipo Add button.

Ipo Add button:
Ipo (loc/rot/scale) retrieved is added to the sum of previous Ipos.

flag:
 Type:    Bool
1 = True
Ipo = Ipo + sum of previous Ipos

0 = False
Ipo = Ipo retrieved

Note:
getIpoAdd()
False returns 2

setIpoAdd(flag)
2 sets it to True.  Not False

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# add retrieved Ipo to sum of previous Ipos
act.setIpoAdd(True)

setIpoAsForce

setIpoAsForce(force)

Sets whether or not to use the Ipo as a force.

force:
  Type:    bool
True or 1 = Use ipo as force
False or 0 = Use ipo as displacement

Note:
getIpoAsForce()
False returns 2
setIpoAsForce(force)
2 sets it to True.  Not False

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# use the Ipo as force
act.setIpoAsForce(True)

# use it
GameLogic.addActiveActuator(act, True)

setProperty

setProperty(property)

Sets the name of the property to be used in the FromProp mode.

property:
Type:  string.

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# set the property name
act.setProperty("action")

# use it
GameLogic.addActiveActuator(act, True)

setStart

setStart(startframe)

Set the frame you want the Ipo to start playing.

setStart:
Type: integer or float

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# set the starting frame
act.setStart(11)

# use it
GameLogic.addActiveActuator(act, True)

setType

setType(mode)

Sets the mode you want the ipo actuator to use.

mode:
   Type:   integer
1 = "Play"
2 = "PingPong"
3 = "Flipper"
4 = "LoopStop"
5 = "LoopEnd"
6 =
7 = "FromProp"

Sample Code

# get controller
controller = GameLogic.getCurrentController()

# get ipo actuator attached to the controller named WalkCycle
act = controller.getActuator("WalkCycle")

# set mode to LoopStop
act.setType(4)

# use it
GameLogic.addActiveActuator(act, True)



Blender 3D
Game Engine