Is there a move block in X

I am trying to recreate the MoleMash for App Inventor 2 using Cross platform. In the Android version they have a “Call sprite/image and move to x and y coordinates”. How can I randomly position an image/sprite using cross platform ? Thanks

You can see an example of random positioning on the “Game 1” screen in the demo project:

very good but in the screen “Get info” if I wanted to store one of the data … for example “type” and save it somewhere how do I do it?



This can be done in the following ways:

  1. Through the Firebase JavaScript API - quickly and reliably, but difficult
  2. Through the web server - simple, but slow and not very reliable
  3. Put the data in the window.prompt dialog and copy this data from there in the native part

The second option you can see in the project



Is there a working link for this? The link is currently dead. I’d like to randomize location for a sprite as well based on a timer.


@jeem @Paolo_Yu This reminded me of @joannietw’s “whac-a-mole” game that she tweeted about recently.

There are a couple of ways to do random movement, but here’s one approach you could use:

Hope that helps