instinct / GameFroot

GameFroot iOS and Bundlenator
www.gamefroot.com
5 stars 0 forks source link

Robot editor x velocity = 0 error #295

Closed thornyd closed 12 years ago

thornyd commented 12 years ago

I created a robot that sends a message to itself to set x velocity to zero if its facing away from the player, but when I update the workspace through the view source window, it removes all slots underneath the set velocity slot and changes the value to blank. Here are before and after screenshots and underneath is the source code.

http://i42.tinypic.com/157kuf9.png

http://i44.tinypic.com/30jiljt.png

http://i40.tinypic.com/2eyaoes.png

http://i44.tinypic.com/316qkoz.png

{ "robot": "0.9", "properties": { "displayName": "Unnamed Robot", "description": "Describe your robot here.", "health": "100", "maxhealth": "100", "immortal": true, "solid": true, "physics": true, "name": "Unnamed-Robot" }, "behavior": [ { "event": "onSpawn", "eventsheet": { "position": { "top": 140, "left": 163 } }, "commands": [ { "action": "messageSelf", "message": "facin" } ] }, { "event": "onMessage", "eventsheet": { "position": { "top": 108, "left": 477 } }, "commands": [ { "action": "ifElse", "condition": { "token": "faceObject", "objinstance": { "token": "player" } }, "onTrue": [ { "action": "changeXvelocity", "delta": 1 } ], "onFalse": [ { "action": "messageSelf", "message": "facin away" } ] }, { "action": "messageSelfAfterDelay", "message": "facin", "delay": 1000 } ], "messageName": "facin" }, { "event": "onMessage", "__eventsheet": { "position": { "top": 146, "left": 849 } }, "commands": [ { "action": "setXvelocity", "velocity": 0 }, { "action": "faceObject", "objinstance": { "token": "player" } }, { "action": "messageSelfAfterDelay", "message": "facin", "delay": 1000 } ], "messageName": "facin away" } ], "variables": {}, "kinds": {} }

InstinctBrett commented 12 years ago

was issue with faceObject and facingObject commands in the robot-commands.js list. Fixed.