Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!isObject(bunnyBehavior))
- {
- %template = new BehaviorTemplate(bunnyBehavior);
- %template.friendlyName = "Bunny Behavior";
- %template.behaviorType = "Player Behavior";
- %template.addBehaviorField(yVelocity, "The object's vertical speed", float, 5.0);
- }
- function bunnyBehavior::onLevelLoaded(%this)
- {
- //moveMap is already defined in another place, and function call does work
- moveMap.bindCmd(keyboard, "space", "bunnyBehavior.jump(1);", "");
- }
- function bunnyBehavior::jump(%value)
- {
- //line below gives me junk data
- echo("yVelocity is" @ %this.yVelocity);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement