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:

https://x.thunkable.com/projects/5b1e34c577dd8ed3cf40b07a/project/properties/designer/

Hello,
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?

Andrea

Hello,

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

https://x.thunkable.com/projects/5af67d033098b30001ec63ef/project/properties/designer/

Alex

Hi,

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.

Hi,

https://x.thunkable.com/projects/5de6b20b4d23f65c96220990/project/properties/designer/

@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

2 Likes