Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Godot 4 Space Shooter Class #8: Randomly Spawning Enemies”.
Other ways we can help with Godot.
Learn with a mentor
Scheduled Game Development courses with live guidance and a certificate.

Course/Training Unreal Engine — Procedural Animation for Humans in Unreal Engine 5
★ 5.0 (60)

Course/Training Unity — Learn to Code by Making a 2D Platformer in Unity & C#
★ 5.0 (10)

Course/Training Construct 2 — Creating a Top-Down Shooter Game in HTML5
★ 5.0 (10)
Have it built for you
No time to learn Godot? Our team can do the project for you.

Development Service: Unity — Building a Battle Royale RPG Game Using Unity and Blender Ultimate Class
★ 5.0 (26)

Unity Development Services — Become a Unity Game Developer Learning Paths
★ 5.0 (12)

Development Service: Unreal Engine — Unreal Engine 4 – Build Your First Game with UE4!!
★ 5.0 (12)
Get notified about new Godot classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
In this episode, enemies continuously appear from the top of the screen at random positions, and their type is randomly selected from a list that can be directly filled in the inspector. Hello, let's continue our galactic warrior journey. Enemies are ready, now we will automatically spawn them using a timer and the enemy area.
Open main.tcn. Add a timer named timer musuh with a wait time of 0.8 seconds and auto start active. Select main then attack script named main.gede. Create an exported variable named musuh scene of type array of pack scene. In underscore ready, call randomize and connect the timer musuh timeout signal. Every time out, select a random scene with PIK random, create the enemy, place it at a random X position between 60 and the screen width minus 60, exactly at the top of the screen, then add it to main. Select main, in the inspector open musuh scene, add two elements, then fill them with musuh piring and musuh serangga via quick load. Save. Press F5. Enemies are coming from the top in random formations. Lasers cannot destroy them yet, that's the task of the next episode.
Want to be able to make your own game? Cerdas Inovasi Digital offers game creation courses with Godot, Construct 3, and Unreal Engine, educational game and promotional game development services for schools and businesses, as well as selling this tutorial project file complete with its assets.
Want to master all of this series? From a blank project up to exporting the game as a Windows application? All 14 episodes, complete with PDF step-by-step guides, are available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy a single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact us via WhatsApp, or visit cerdasinovasidigital.com Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →