HOW TO LAY A BOMB?
Posts
Pages:
1
It is me again, with another problem that is probably so simple, I could hit myself for not knowing it, but here it goes.
How does one lay a bomb?
You know, like in zelda, you lay a bomb and after a few seconds it explodes. if you hit the right wall or rock or so, the wall or rock is going to disappear.
now, i get the disappear part. i also get the bomb explode part. my problems would be twofold in that case:
how does one lay a bomb by pushing a button?
how to specify the radius the bomb has so that everything inside the radius gets desotryed?
How does one lay a bomb?
You know, like in zelda, you lay a bomb and after a few seconds it explodes. if you hit the right wall or rock or so, the wall or rock is going to disappear.
now, i get the disappear part. i also get the bomb explode part. my problems would be twofold in that case:
how does one lay a bomb by pushing a button?
how to specify the radius the bomb has so that everything inside the radius gets desotryed?
Which engine do you need to do this in?
Is it a one-bomb-at-a-time thing or would you be able to use multiples?
Well the way I would do it is to set up X events (where X is the number of bombs you can place simultaneously) off-screen somewhere or in a location you can't get to (if it would be visible on-screen, set its graphic to blank as well). Also set aside two switches for each bomb, and a variable.
I would also have a common event checking for the bomb key being pressed, and have that check the value of the variable. If it's 0, turn on switch 1 and move bomb 1 to the player's location. If it's 1, turn on switch 2 and move bomb 2 etc.
In the bomb events, the first page will be nothing with a blank graphic. The second page will have its activation condition set to its respective switch, with the bomb graphic. This page will be parallel process that waits for however many seconds you want the bomb to take to explode (include an animation for this if you have one) and then turn on the second switch for that bomb.
Then have another event page triggered by that switch with no graphic (or moving through an explosion graphic if you didn't already do that on the second page or want the removal of the bombable area to coincide with the explosion). Here you will check the coordinates of the bomb event and then go through a series of conditional branches checking the terrain ID of each tile in whatever radius around those coordinates you want the bomb to affect. (I assume you'd be using a unique terrain ID to mark bombable areas).
Does this make sense?
I would also have a common event checking for the bomb key being pressed, and have that check the value of the variable. If it's 0, turn on switch 1 and move bomb 1 to the player's location. If it's 1, turn on switch 2 and move bomb 2 etc.
In the bomb events, the first page will be nothing with a blank graphic. The second page will have its activation condition set to its respective switch, with the bomb graphic. This page will be parallel process that waits for however many seconds you want the bomb to take to explode (include an animation for this if you have one) and then turn on the second switch for that bomb.
Then have another event page triggered by that switch with no graphic (or moving through an explosion graphic if you didn't already do that on the second page or want the removal of the bombable area to coincide with the explosion). Here you will check the coordinates of the bomb event and then go through a series of conditional branches checking the terrain ID of each tile in whatever radius around those coordinates you want the bomb to affect. (I assume you'd be using a unique terrain ID to mark bombable areas).
Does this make sense?
whoa, a lot of info there. i read throigh it and understood it. so Ill try this and then head back here for clarification :) thanx^^
Okay, i tried that and you totally lost me on the last part. How do i check the coordinates, what is with conditional branches and map ID and huh? sorry i am a noob to this and this is way over my head :(
Well first of all, can you go into the script editor, look at Game_Map and tell me if you can find a function called "terrain_tag"? (I don't have XP on this computer so I can't check)
Oh, sorry; I meant VX, not XP.
Can you PM me the code from the Game_Map script?
Can you PM me the code from the Game_Map script?
Okay, it doesn't look like VX has terrain tags. I couldn't remember because it's been a while since I last used it. Let me have a think about this one and I'll get back to you.
Pages:
1















