Running Everything — Unity Game 3

Scripts & Running — Episode #03

J3
KidsTronics
4 min readMay 19, 2018

--

Step#01 — Go to my Google Drive and download all the scripts at once;

Step#02Paste inside folder Scripts all files there;

Step#03 — Let’s distribute each function; (1) First Drag BGScroller to each AmazonForest; Set (2) Scroll Speed=-5 and Tile Size Z= 1090; Repeat this to all AmazonForest objects (note we set (3) Shader = unlit/Texture to all images ;)

Step#04 —Now run the game and you will see the images rolling on the screen; photos of the Amazon River invite you to visit Manaus — AM;

Step#05 — Now select DrugDealer, Add GameController script to it, drag it until the p47 image disappear from the screen, set:

Step#06 — Add Capsule Collider component to p47_scheme1; click Edit Collider:

Step#07 — Attach DestroyByBoundary script to Boundary object;

Step#08 —Add Rigidbody and Capsule collider to Super Tucano; Set:

Step#09— Head over Asset Store again to import enemy and player explosions particles system; (1) Click Asset Store tab; (2) click import Space Shooter Tutorial; (4) deselect all and (3)choose explosion enemy-prefab and explosion player-prefab (5)click import;

Step#10 — Return to DrugDealer and Tag it as GameController;

Step#11— Select p47_scheme1 and add DestroyByContact script and drag to its slots each object shown below:

Step#12 — On Project tab select Prefabs > explosion_enemy, Click Add Component buttom and Add Audio Source, drag explosion_enemy to AudioClip slot;

Step#13 — Let’s make Missiles: Create an Empty object, (1) rename it to Missile; Create inside it 3d Object > Quad, (2) rename it to Bomb0, reset it; y=0.4;

Now Add Components: (3) Rigidbody; (4) Mover Scripts (Speed = 50) and (5) Capsule Collider, click Edit Collider:

Step#14 — Open Material folder and Drag n’ drop fx_bolt_orange inside Bomb0; This will add a particle representing each missile;

Step#15 — Create more 2 bombs and locate it below the SuperTucano; repeat the previous procedure;

Step#16 — Now drag the Missile to Prefabs and delete it from scene_01;

Step#17 — There you have it! Congrats!

The only modification required was the color of the texts for the re-start and score panel. That’s all. Run the game and slowly go to understanding the code. So I understand that we learn faster in this fashion...see something working to understand the code as it plays the music!

BTW, music? tip: see my drive…add AudioSource to EMB_314_Super_Tucano and drag weapon_player to it (disable Play On Awake); add another one and drag Tucanos_motor — enable Play On Awake;

Select DrugDealer, add AudioSource and drag Suspense String. Take care!

1

Thank you!

Bye!

Download Images/Scripts from MyGoogleDrive now!

Index:

Post # 00 — EMBRAER Super Tucano VS A-10 Thunderbolt II

Post # 01 — Preparing Scenario — Unity Game 1

Post # 02 — Lighting System & More — Unity Game 2

Post # 03 — Running Everything — Unity Game 3

References & Credits

Space Shooter tutorial

Unity version 2017.3.1f1

--

--

J3
KidsTronics

😎 Gilberto Oliveira Jr | 🖥️ Computer Engineer | 🐍 Python | 🧩 C | 💎 Rails | 🤖 AI & IoT | ✍️