Creator Series: How to Mod 'Yeet the Yeti'

Blocksmith is the ultimate modding software. When a Blocksmith creator posts a remixable experience or 3D model, then anyone who has a free Blocksmith account can mod their creation to create their own levels, expand gameplay, and generally put their own twist on it!

So when we received a message recently from Amit Ratnaparkhi (an educator planning to use the "Don't Yeet the Yeti" game for a group of computer science students) asking how to mod the game, we loved the idea! They want to extend the game by adding another food item that is only eaten by one of the Yeti's friends.

That is a perfect way of modding and extending the game, so we have put together this Creator Series Page to help. Get ready to practice your JavaScript and variable programming skills to feed the Yeti's friends with a food item of your choice!

How to Spawn a New Food for a Friend

1. Set up a new Food Spawer

To launch a new food at one of the Yeti's friends, you need to create a new Spawner for that food item. Fortunately, you can duplicate and re-use the "FishSpawner" object.

a. Open the Don't Yeet the Yeti Template in the Builder.

b. Open the Hierarchy panel and select the IceCannon object.

ALT TEXT HERE

c. Use Edit Group on the IceCannon to see the group editor.

d. Find the FishSpawner object and duplicate it.

e. Rename the new FishSpawner to be: <YourFoodItem>Spawner
(eg. BurgerSpawner or MushroomSpawner)

2. Spawn a New Food Item

With the new spawner, you can now change the 3D model that gets spawned to be your new food item! You can easily replace the spawned BlueFish 3D model with anything you want from the 3D model pool, or your own design.

a. Keep the new Spawner selected! Then click on Edit Object on the new food Spawner.

b. Rename the BlueFish group to be your Food item name (eg. Mushroom).

c. Delete the Yellow Fin Fish group.

d. Open the 3D Models tab and search for your food item 3D model (or design a new one).

e. Add the new food 3D model to the editor and move it directly over the FX Spawner:
ALT TEXT HERE

f. Exit the Group Editor.

3. Add a FoodSpawner Object Variable Component

Now that you have your new food spawner all set up, you need to tinker with the "engine" that runs the whole thing, which is the Object Variable and JavaScript code. Once again, you can copy much of the existing setup to quickly make your own.

a. Keep the Ice Cannon selected. In the Object tab, add a Variable Component.

b. Rename it exactly to: <YourFoodName>Spawner
(eg. MushroomSpawner)

c. Change the Variable type to: Object

d. For its Initial value, choose Other Object and then find the NewFoodSpawner object in the Hierarchy

ALT TEXT HERE

4. Reference the NewFood Object Variable in JavaScript

Just reference the new Spawner and Object Variable in the JavaScript code now, and then you are finished with the new food set up! With the new Object Variable component set up, you are all set to edit the JavaScript code to reference your new food.

a. Select the IceCannon group again.

b. Open the Event tab and select the Edit Script button on the Fire event.

c. In the Edit Script window, copy the FishSpawner variable initialization line.

d. Paste the new FishSpawner variable line under the existing one, or on Line 5.

e. Change the names of the JavaScript Variable and the Component variable in the new line to reference your new food
(eg. MushroomSpawner for both).

ALT TEXT HERE

5. Complete the JavaScript Code and Play!

That's all there is! Your Yeti game is now set up to spawn a new food item at the Yeti's friend of your choice. Make sure to complete the rest of the JavaScript code to actually spawn the objects. You can refresh how to do that in the Hour of Code Quest.

a. Now complete the code to spawn the food items (the original JavaScript Quest challenge).

b. Make sure to reference your NewFoodSpawner for one of the Yeti's friends! For example, you can feed the Penguin mushrooms by referencing a MushroomSpawner in its code line.

c. That's it! Your Ice Cannon should now spawn a new food item when targeting one of the Yeti's friends!

ALT TEXT HERE