Fangames > Programming Questions
Avoidance Battles - Help plz!
Storm_Lakitu2:
Hello there!
Im currently working on a fangame with Sephalos Engine and now i got the idea to put in an Avoidance Battle in a specific part of the game. But the problem is - i dont know how to make one!
If anyone can tell me how to make one, and if i have to code, tell me how and what to code, i would be very grateful. Also, i have never coded before, so i dont have any experience in this.
Thx already, Storm.
Sephalos:
You'll need 3 types of objects.
A boss, projectile spawners and projectile objects. Set up a timer on the boss that will create projectile spawners at specific times. Then set up a timer on the projectile spawners to create projectile objects.
Sudnep:
There are two ways that seem to be relatively easy to understand.
The first is the built in timeline functions in gamemaker and the other is a counter that uses switch(case) structure.
Timeline:
(click to show/hide)This is what I first used but I found it frustrating but it might be easier to understand. Create some random timeline and name it whatever you want (tl_miku01 or tlMiku01, whatever) and then create some object (for the sake of it will be obj_miku) and in the creation event of the object and do something like this:
What this does is it will run the timeline in order per frame.
In the timeline you can click the button with a big green + sign called Add. This prompts a menu to select a moment in the timeline to add something to it.
0 = first step in the timeline
500 = 500th step in the timeline (or 500/50 seconds after the timeline starts)
Stepcounter:
(click to show/hide)After receiving information and being dumb for a while I found this way to make avoidance with some advice from bmx since I never thought of it like this. Specifically this makes it easier to see what you're doing and is much easier to copy and paste / organize properly.
In obj_miku, create a step event where you have a variable called STEPCOUNTER ( name is whatever you want but this is what I use) and increment it by 1 at the beginning and do a switch(case) structure for choosing each moment.
This works the EXACT SAME WAY (this way starts at 1 for reference, and the other one starts at 0 but this is whatever).
There might be more ways of doing it but I don't know them and it's all preference at that point.
Use controller objects to do more of the spammy stuff every frame for sake of time and how much you have to type.
Storm_Lakitu2:
Thx already for the helpful Replys.
I will try them out ;)
I guess now i can make myself my own Rainbow Miku with Shitty Japanese Anime Music and a Moving Grid Background right? Kappa
klazen108:
--- Quote from: Storm_Lakitu2 on March 31, 2015, 06:08:08 AM ---I guess now i can make myself my own Rainbow Miku with Shitty Japanese Anime Music and a Moving Grid Background right? Kappa
--- End quote ---
:Kreygasm:
Navigation
[0] Message Index
[#] Next page
Go to full version