Forums

OverviewV-Play 1 SupportBuildEntityButton – create entity › Reply To: BuildEntityButton – create entity

OverviewV-Play 1 SupportBuildEntityButton – create entity › Reply To: BuildEntityButton – create entity
#4947

phil.jahoda

Thank you very much, changing our scene’s id to “scene” really eliminated the previously described error.

Unfortunately, a new error new occurs when dragging and releasing: 😀

BuildEntityButton: button MouseArea pressed, start dragging entity
EntityBaseDraggable: storing property active with value false
EntityBaseDraggable: storing property state with value 
EntityBaseDraggable: storing property bodyType with value 2
EntityBaseDraggable: storing property implicitHeight with value 0
EntityBaseDraggable: storing property smooth with value false
EntityBaseDraggable: storing property width with value 32
EntityBaseDraggable: storing property visible with value false
EntityBaseDraggable: storing property clip with value false
EntityBaseDraggable: storing property bullet with value false
EntityBaseDraggable: storing property density with value 0
EntityBaseDraggable: storing property collidesWith with value 65535
EntityBaseDraggable: storing property groupIndex with value 0
EntityBaseDraggable: storing property focus with value false
EntityBaseDraggable: storing property baselineOffset with value 0
EntityBaseDraggable: storing property angularVelocity with value 0
EntityBaseDraggable: storing property collisionTestingOnlyMode with value false
EntityBaseDraggable: storing property fixedRotation with value false
EntityBaseDraggable: storing property scale with value 1
EntityBaseDraggable: storing property activeFocus with value false
EntityBaseDraggable: storing property categories with value 1
EntityBaseDraggable: storing property opacity with value 1
EntityBaseDraggable: storing property rotation with value 0
EntityBaseDraggable: storing property angularDamping with value 0
EntityBaseDraggable: storing property restitution with value 0
EntityBaseDraggable: storing property transformOrigin with value 4
EntityBaseDraggable: storing property sleepingAllowed with value true
EntityBaseDraggable: storing property objectName with value boxCollider
EntityBaseDraggable: storing property torque with value 0
EntityBaseDraggable: storing property friction with value 0.20000000298023224
EntityBaseDraggable: storing property x with value 0
EntityBaseDraggable: storing property enabled with value true
EntityBaseDraggable: storing property y with value 0
EntityBaseDraggable: storing property z with value 0
EntityBaseDraggable: storing property sensor with value false
EntityBaseDraggable: storing property height with value 32
EntityBaseDraggable: storing property implicitWidth with value 0
EntityBaseDraggable: storing property linearDamping with value 0
Box2DBody: calling sychronize after active got set to true 
BuildEntityButton: entity got pressed: EntityBaseDraggable_QMLTYPE_76(0x114c8c730, "file:///Users/philipp/CrazyElephant-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/CrazyElephant.app/Contents/Resources/qml/entities/DraggableEntity.qml_96") , for creationType: file:///Users/philipp/CrazyElephant-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/CrazyElephant.app/Contents/Resources/qml/entities/DraggableEntity.qml
pos of createdEntity: 73 8
Cocos2DWrapper: updateItemPositionAndRotationImmediately: parentPosOfTopLeft: QPointF(73, 8) EntityBaseDraggable_QMLTYPE_76 (this = 0x114c8c730 , parent = 0x10fde6d50 , geometry = QRectF(73,8 0x0) , z = 1 ) 
the position really changed, so call all children recursively 
Cocos2DWrapper: callTransformForAllChildrenRecursively() for node 0x103bdea20 
Cocos2DWrapper: callTransformForAllChildrenRecursively() for node 0x103bdd370 
Cocos2DWrapper: callTransformForAllChildrenRecursively() for node 0x103bdd4c0 
Cocos2DWrapper: callTransformForAllChildrenRecursively() for node 0x103be3200 
Cocos2DWrapper: callTransformForAllChildrenRecursively() for node 0x103be3350 
entityReleased position: 238.5 72 snapped position: 224 64
EntityBaseDraggable: restoring property active to initial value false , current value: true of colliderComponent BoxCollider_QMLTYPE_27(0x114c9c9b0, "boxCollider")
EntityBaseDraggable: restoring property categories to initial value 1 , current value: 65535 of colliderComponent BoxCollider_QMLTYPE_27(0x114c9c9b0, "boxCollider")
EntityBaseDraggable: restoring property collisionTestingOnlyMode to initial value false , current value: true of colliderComponent BoxCollider_QMLTYPE_27(0x114c9c9b0, "boxCollider")
entity got released, create it at the position if allowed to build
DragEntity: no creationProperties were defined
EntityManager: createEntityFromUrl: file:///Users/philipp/CrazyElephant-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/CrazyElephant.app/Contents/Resources/qml/entities/DraggableEntity.qml
VisualItemPropertyObserver componentComplete for item EntityBaseDraggable_QMLTYPE_76 (this = 0x110f3adb0 , parent = 0x10fde6d50 , geometry = QRectF(224,64 0x0) , z = 1 ) 
file::/qml/VPlay/core/EntitySelection.qml:15: Unable to assign [undefined] to QObject* target
file::/qml/VPlay/core/EntitySelection.qml:9: ReferenceError: Can't find variable: sprite
EntityManager: entity created with id file:///Users/philipp/CrazyElephant-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/CrazyElephant.app/Contents/Resources/qml/entities/DraggableEntity.qml_99
GameWindow: creating cocos item in cocosWrapper triggered by JavaScript code explicitly: EntityBaseDraggable_QMLTYPE_76(0x110f3adb0, "file:///Users/philipp/CrazyElephant-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug/CrazyElephant.app/Contents/Resources/qml/entities/DraggableEntity.qml_99")

 

PS: I added a physics world to our Scene and set the EntityBaseDraggable properties “allowedToBuild” and “clickingAllowed” to true.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support