Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How do I *dot dot dot [resolved]

How do I make an event character shoot fireballs downward?

Optional: Can the fireballs follow the player, and if they don't hit the player within a certain time or collide with a wall, they subside? Thanks!
 
Shooting fireballs downward is cake-- create an event for the fireball. Set the move route. Set the fireball event to "Event Touch" and have the event commands explode, do damage, and remove the fireball event.

Following, also simple-- make the move route "Move Towards Player."

Timing-- trickier. You'll need a separate parallel process event tracking how long the fireball has been there, and turning the event off with a switch when it's been long enough. But certainly feasible.

Colliding with a wall, though-- that's harder. I can think of two options:

1) Get a script for this. I'm nowhere near skilled enough to help you there.

2) If you are using XP, you can use Terrain Tags to check what kind of square the fireball event is on. If you then make the tiles surrounding the walls have a distinct Terrain Tag, a parallel process event can check the terrain tag of the fireball, and have it detonate harmlessly if it hits one.
 
Thank you! That was extremely helpful

Unka Josh":1jycxui5 said:
If you are using XP, you can use Terrain Tags to check what kind of square the fireball event is on. If you then make the tiles surrounding the walls have a distinct Terrain Tag, a parallel process event can check the terrain tag of the fireball, and have it detonate harmlessly if it hits one.
Good thing I'm using XP :D
 
Rather than terrian tags I'd just suggest using an event
that triggers a switch when the fireball is near the wall
(For Lazy people like me: you can just put events around all the walls :x)
Switch is on - no fireball
 
Too many events= Massive lag, though.

Aside from that, there is no command for collision detection between events. You'd need a parallel process event tracking the X and Y of the fireball, and comparing it to the location of each event... and at that point, you're actually making more work for yourself than using Terrain Tags.

Anyway, the command that you'll need is Control Variable. Set the variable equal to Character (Fireball)'s Terrain Tag.

If you want a more detailed explanation of using Terrain Tags, let me know-- I've got an example somewhere, with some screenshots.
 
That would help, but if the game is still checking thirty events on the part of the map that you're in, it'll still lag.

And, of course, there's no command that collision-checks events, so it still won't work particularly well.
 
Okay, it sort of works. See what I'm trying to do is have a character shoot fireballs whenever it activates a switch. When the FB's detonate, the switch is turned off. However, they only respawn after being detonated if they hit the player, not if they hit the terrain tags. (The character shooting is on a set move route and the switches are activated over and over again during a repeated move route)

So how do I make the fireballs keep spawning?
 
Would you mind posting screenshots of the events as you've coded them? It's probably a simple thing, but I'd need to see the code first, and it's much, much better to look at screenshots than descriptions.
 
Okay, got it.

Here's the problem: When the Terrain Tag is hit, it turns the fireball off.

What you should do instead is just have the Terrain Tag do exactly what it does when it hits the player, minus the damage. Make that part of the event.
 
Dude, you are like Jesus for events! It worked

Thanks

One more thing: How do I make it so if an event is in the same position as another event, in this case, Spikes (Switch03), a switch activates? Here's the scenario, you have to pull a switch to make the spikes come up, but it only adds to a variable if a specific character is over it when the spikes come up.
 
Ah, another variation of the Boulder Puzzle. A simpler one, too.

Here's how you do it: When you pull the switch, use Control Variable to assign the Map X and Map Y coordinates of that event to a pair of variables.

Then just compare the X and Y variables to the coordinates of the spikes. If the spikes aren't moving, you don't even need to use Control Variable to get their coordinates-- just write 'em down, since they won't change.

If that wasn't clear, just let me know, and I'll mock-up a screenshot.
 
I think I got the first part. It's just the second part with the comparing that you lost me on. Which event command do I use to do that?

For the first part, I made two Control Variable commands; one for the character's Map X and one for his his Map Y.
 
Conditional Branch is the one that you need.

You'll use two nested commands for this--
Code:
 

@>Conditional Branch: Variable 001 := 6 (or whatever)

    @>Conditional Branch: Variable 002 := 8 (or whatever)

         Show Animation (SPIKY DEATH) Event 002

Like that. If that was unclear, I can unpack my Boulder Puzzle screenshots for you.
 
MCsephiroth13":1iv2035f said:
I think I got it. Mind posting the pics just to make sure?

BoulderPuzzle6.png


That's the classic Boulder Puzzle one, but the principle is the same. You won't need a parallel process event, because it's going to check when the player flips the switch.
 
Yes. You'll probably want to work some Wait commands in there, too, so that they won't take three hits in 0.15 seconds.

(Which could easily happen, BTW, and is good to remember about these things.)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top