Forums

OverviewV-Play 1 SupportProblems with Grid › Reply To: Problems with Grid

OverviewV-Play 1 SupportProblems with Grid › Reply To: Problems with Grid
#4275

Christian
V-Play Team

Hi Simon,

the Grid, Column and Row elements are used for static objects only. If your balloons should move, you would need to create them from JavaScript code with the help of EntityManager. You can set the initial position for each entity from a for loop, like in the following example they are placed in the vertical center of the screen in a row:

for(var i=0;i<5; i++) {
  entityManager.createEntityFromUrlWithProperties(Qt.resolvedUrl("entities/Balloon.qml"), {x: i*10, y: scene.height/2} );

}

Cheers, Chris

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