I’m making a times tables plat former for my computer science coursework. I want to create something where if they answer a question incorrectly an enemy character spawns and follows them for 10 seconds and then despawns. I think I can create the despawn just using like a destroy objects script but I have no idea how to make the enemy spawn in the first place. Any suggestions?
There are at least ten billion different youtube tutorials on spawning. Start there.
There are also plenty of tutorials for making question / answer / trivia quiz game designs.
Two steps to tutorials and / or example code:
- do them perfectly, to the letter (zero typos, including punctuation and capitalization)
- stop and understand each step to understand what is going on.
If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.
Imphenzia: How Did I Learn To Make Games:
I’m a little puzzled about how people have been posting questions lately. For years actually but lately these question have been hard to follow.
What is an “enemy” and what is “follows them” mean? Imagining that something will appear and disappear try to just have “enemy appears” and “enemy disappears” print somewhere you can see it. That insures you have the basic logic in place. If that is an image or an animation or anything else it doesn’t really matter. Get the basic parts working and add detail later.
As for destroying something why? Nobody going to make a second mistake? Isn’t this more a case of having some sort of “enemy” in the app that you can make appear and disappear according to some condition.
Don’t make things harder than they have to be.
I’ve seen a lot of these posts lately as well.
I think it’s just a terminology and communication issue.
It’s common to describe something in a game simply, as “an enemy character spawns,” as if there is a magical EnemyController
just waiting to do it all if you could just find the correct syntax.
This is why I think ultra-simple games help new game developers develop a mental framework for what constitutes what, what the parts of “an enemy character” are, between behaviors and appearance and relationship to the player, even the basic concept of a player’s health.
Technical communication is Really Hard™ when you don’t realize that you lack the language necessary.
I’m not picking on the OP it is only that so many questions seem to lack necessary context. And I’m super shocked by all the necro posting lately. “Me too” responses to threads that closed several years ago seems odd.
I think I’m more of an “action/reaction” style developer… they are only enemies if the context warrants it being thought of as a combatant of some sort. The wrong answer on a quiz could (in olden times) have spawned a friendly guide