Jump to content

Controls Docs


photo

Recommended Posts

// functional
ControlsDummy controls = actor.getControls();
controls.setState(CONTROLS_STATE_FORWARD, 1); 

 

// Interpreter::parse_user_class(): unknown "Controls" class member "setState"


Controls controls = actor.getControls();
controls.setState(CONTROLS_STATE_FORWARD, 1); 

 

Documentation suggests that setState is a method of Controls, and would be inherited by ControlsDummy. Behavior suggests otherwise.

Link to comment

Sorry, we could not reproduce this issue.

For example, this piece of code works fine:

 

actor = new PlayerActor();
Controls controls = actor.getControls();
if(controls == NULL) {
log.message("Controls are NULL\n");
}
else {
log.message("typeof(controls) = %s\n",typeof(controls));
}
controls.setState(CONTROLS_STATE_FORWARD,1);

Link to comment
×
×
  • Create New...