BlocosIA Wiki Editor

Grab the 3D coins

Easy · Clones become golden spheres in the 3D world and vanish when you touch them.

Interactive tutorial: the editor checks each step by itself.

  1. Add the "3D World" extension.
  2. Pick a sprite. Drag "when flag clicked" and snap "generate flat world…" (3D World) under it.
  3. In Control, snap "repeat 10" and put "create clone of myself" inside it.
  4. Make another script with "when I start as a clone" (Control) and snap "become 3D body: sphere" (3D World).
  5. Snap "go to a spot on the ground 8 blocks from the player" to spread the coins.
  6. Add a "forever" with "if am I touching the player? (3D) then" and "delete this clone" inside.
  7. Click the flag and go collect the coins!
  8. Challenge: create the variable "coins" and snap "change coins by 1" before deleting the clone. (challenge)

The blocks of the finished program

• evt_bandeira
• m3d_gerar [TIPO: plano, SEMENTE: 5]
• ctl_repetir [VEZES: 10]
  • ctl_criar_clone

• ctl_quando_clone
• m3d_corpo [FORMA: esfera, COR: #F2C230, TAM: 45]
• m3d_corpo_perto [DIST: 8]
• ctl_sempre
  • ctl_se [COND: (m3d_corpo_estado)]
    • var_adicionar [VALOR: 1, VAR: moedas]
    • ctl_apagar_clone

Open in the editor