cancel
Showing results for 
Search instead for 
Did you mean: 

Weekly Creator Challenge #5: New Creators

SeeingBlue
Mentor

New Creator Challenge: Simple Asset Spawning

 

Challenge Overview

This challenge introduces you to simple asset spawning using the desktop editor and Typescript.

You’ll learn how to:

  • Create a Template Asset
  • Edit a Template Asset
  • Use Simple Spawning to spawn your asset.

 

Duration: Mar 24, 2025 - Mar 28, 2025

Estimated Time: 30-45 Minutes

Mentor: SeeingBlue

Rewards:

  • Challenge Champion Badge 🏆
  • Challenge Trifecta Badge 🏆🏆🏆 after completing three challenges

 

Need Help?

  • Forum Support: I’ll be actively monitoring this thread during the Challenge duration to help you succeed
  • Live AMA: Join my Asset Spawning and World Streaming AMA on 3/25/2025 @ 12PM PST. Register here

 

Skills You’ll Develop: 

  • Creating an Asset
    • Why: It is the first step to creating expansive dynamic worlds.
    • Uses: Saves objects to be used later in your world or other worlds.
  • Edit an Asset
    • Why: Allows you to correct mistakes or add features to an asset.
    • Uses: Update an asset once and propagate the change to all the worlds that use it.
  • Spawn an Asset
    • Why: Allows you to control the amount of resources being used in your world by determining when, where, and how an asset arrives in your world.
    • Uses: Spawn creatures only when a player is near a specific area, create a grabbable that replenishes each time a player grabs one, and much more!

 

What You’ll Need

 

Helpful Resources

 

Challenge Steps:

  • Download the Challenge PDF in this post and follow the steps.

 

How to Earn Your Badge

  1. Complete all the steps in this challenge.
  2. Document the changes you made to your asset.
  3. Optional: Publish a world with a trigger zone gizmo to spawn your asset.
  4. Post to this thread with:
    • A description of your asset.
    • List of changes you made to the asset.
    • Screenshots showing your asset spawned in the world.
    • Optional: A link to a published world with the ability to spawn your asset.

P.S. Want more of a challenge? Try out the Experienced Creator Challenge: World Streaming.

Join my AMA: Asset Spawning and World Streaming on 3/25/2025 @ 12PM PST. Register here

 

Upcoming Events:
AMA- Getting Started with Typescript Thursday, April 17th 5 PM PT - Register
Workshop - World Planning Made Simple Thursday, April 23rd 11 AM PT - Register
April Programming Calendar
7 REPLIES 7

Grumpa.Hoyt
Member

I see how I can access the spawned Entity using this.world.spawnAsset since it returns a Promise<Entity[]>. But what if I use the hz.SpawnController?  It only seems to return Promise<void> for its methods. I would like to be able to get the spawned Entity and add attributes (such as physics, tags, scripts?, etc.). 

According to the Creator Manual, after the promise is received you have to use controller.rootEntities to receive the entity array. Hope that helps.

Upcoming Events:
AMA- Getting Started with Typescript Thursday, April 17th 5 PM PT - Register
Workshop - World Planning Made Simple Thursday, April 23rd 11 AM PT - Register
April Programming Calendar

Grumpa.Hoyt
Member

Added my baseball as an asset from the batting cage tutorial. While spawning, I learned that you can't do that from a local script. To modify the asset, I removed the ball script that was originally attached (it did the pseudo-spawn thing like in the tutorial. somewhere along the way, I lost the ability to actually hit the ball (during the tutorial, I got a nice "crack of the bat" sound effect and had to put colliders up to stop the ball from falling off the edge of the world.  The spawn works like this: when you grab the bat, the ball will spawn from an offset from the player's position (not yet rotation).  When you let go of the bat, the ball is deleted.  I will keep working to get back the capability to actually hit the ball and will eventually add some graphics to document hits and misses.

I am glad this challenge was put out: I can see spawning items in many situations. 

https://horizon.meta.com/world/570922982775205

Screenshot 2025-03-27 182705.png

Great job on this. You are correct, local scripts cannot access PPVs or handle spawning/despawning. You may have to explore transferring ownership of the ball and bat to the player if you haven't already.

Upcoming Events:
AMA- Getting Started with Typescript Thursday, April 17th 5 PM PT - Register
Workshop - World Planning Made Simple Thursday, April 23rd 11 AM PT - Register
April Programming Calendar

ka_Tia_Fr
Member

hello Why does my script have a problem with horizon/core? 😓Capture d'écran 2025-04-15 180750.png

It would suggest it doesn't have access to the definition file, which is created on your computer by default when you join a world and create a new script. Is this SimpleSpawning file being run from a world folder created by the desktop editor, or just in a separate folder you created?

Upcoming Events:
AMA- Getting Started with Typescript Thursday, April 17th 5 PM PT - Register
Workshop - World Planning Made Simple Thursday, April 23rd 11 AM PT - Register
April Programming Calendar

avec l éditeur de bureau ,j’ai fait une pause et je l’ai rallumé, et maintenant ça marche. Les Mystères de l informatique😁😂 

Merci de vos réponses.