How to fire a cannon and have the player try and dodge it?

Status
Not open for further replies.

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
Okay, first off - hi again and sorry for creating so many threads, but I have the stupidest ideas and making them work isn't all that easy...

Well, my idea is to have the player control the ship vehicle and sail down a river like that, except he or she will be fired at by cannons on the side of the river.
There should be a health bar for the ship and every time you get hit by a cannon ball your health gets less and less until it reaches zero and the player gets a game over (or makes it to the end, which is obviously the goal)

(it's a bit of a mini-game, so I don't want to make it too hard)

That's the gist of it.

Thing is, I have absolutely no idea how to make the cannons fire the projectiles
I've been playing around with events, but nothing's really working out...

So I thought why not ask the RPG Maker veterans of the forums?
Anyone have any ideas?
Thanks in advance!
 

(This is the map, the player is teleported from another map at the marked spot and a cannon ball should be fired when they are 2 or 3 tiles into the map)
 

Lustermx

Veteran
Veteran
Joined
Mar 17, 2012
Messages
252
Reaction score
147
Primarily Uses
Um, you could probably make the cannon projectiles have invisible events which after a time limit, set on a parallel process changes graphics and then shoots outwards.

Have the projectiles have X and Y variables and check with a conditional branch if those variables equate to the player X and Y variables. If they do, then you can decrease the player's HP.

Once the projectile has either collided with the player or gone off screen, you can change it back to an invisble event and set its position back onto the cannon.

That's how I would do it anyway with the love of Parallel processes. 
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
With the use of autonomous movement, this can be done with very simple events.

You need a minimum of three pages in your event, one "before shooting", one "ball moves and damages" and one "resetting"

Before shooting has no condition and no sprite, it's basically to place the event somewhere. It might contain commands to initialize and check the ball.

The second page you set to event touch and include the damage routine that should happen when the ball hits. It's completed by a command to switch active the third page.

It also contains in autonomous movement the custom move route of the ball, with another switch to page 3 at the end (flight path completed without hitting, you can use general switch but need a script command to change selfs-switch)

Third page resets the ball to be fired again, commands depending on how you want that done.
 

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
Thank you both for answering!

Sorry, Lustermx, but I find Andar's solution a bit easier (at least it sounds easier)

But I can't really get the projectile to move and work the way it's supposed to...

Page 1 of the event


Page 2


Autonomous Movement


Maybe this information is important :|  - the map is quite big and there are quite a number of cannons on each side of the river.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
You made a mistake on the second page - there is no condition to the used switch.

Every page of an event needs a different set of conditions (top left area), and the first two pages have the same conditions - both have NO conditions. If the third page also has no condition, then the first pages will never be executed, because if several pages have all conditions fulfilled, then only the page with the highest number would be executed.

In the case of many cannonballs, use self-switches instead of general switches and use the script command to switch them on in the move route - but wait with that change until you have the basics cleared and a few moving cannonballs...

In the example given above, the second page needs to be conditioned to switch 44 ON, the third page needs to be conditioned to switch 45 ON, and the move route should switch 45 instead of 44 ON.
 

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
I got it to move!
Although now it doesn't subtract anything from the player's health...

Also, on page 3, I'm not sure how to make the event repeat itself

Page 1



Page 2


Autonomous Movement


Page 3 (still empty)


(Thanks for your patience with me ><)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Then we need more info on your plans, for example "what is player health"?

From the look of your pages, you're defining that for yourself and don't use the actor values, is that correct?

If yes, how did you define and check your health variables in other events?

If not, then you need to explain what you want to be reduced when the ball hits.
 

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
I used this video tutorial to create a health bar which decreases when the player is touched by an object/enemy that is made to decrease the player's health as shown on the health bar (so not the player's actual health, but just the one on the health bar)
(the first few seconds show the result - 12:16 shows the creating of the common event)
http://www.youtube.com/watch?v=0AkRnjef3tE

To answer your question, I use a common event, variables and pictures to show and make the health bar work
I made the health bar for this map (and this 'minigame') only (the rest of the enemies give instant game over on touch)
The 'health bar' basically means - get hit 8 times and it's game over

Sorry for the confusion and I hope I'm explaining this logically.

Common Event
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You will have to set the variable at 8 sometime during the game, otherwise by default, it will be at 0. This will make things much easier to track, instead of using negatives.


Also, question, are you using the Japanese version translated to English?
 

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
Yeah, I got it right when it came out in Japan sometime at the end of 2011 or start of 2012 (I don't really remember), figuring "ah, it shouldn't be too hard to figure out even if it's Japanese"

It really wasn't too hard and I was getting by, but I applied an English patch as soon as that was available just to make it a tad easier


Also, I changed the variables from 8 descending to 0, but it gave me an instant game over on startup  :|
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Yeah, I got it right when it came out in Japan sometime at the end of 2011 or start of 2012 (I don't really remember), figuring "ah, it shouldn't be too hard to figure out even if it's Japanese"


It really wasn't too hard and I was getting by, but I applied an English patch as soon as that was available just to make it a tad easier
So you ... bought the Japanese version?

Also, I changed the variables from 8 descending to 0, but it gave me an instant game over on startup  :|
Don't forget to set your variable to 8 before you run this common event.
 
Last edited by a moderator:

HayleeSade

Villager
Member
Joined
Aug 4, 2013
Messages
15
Reaction score
2
First Language
Dutch
Primarily Uses
So you ... bought the Japanese version?
Yeah, I'd just started my study of Japanese then, so thought it'd be good practice alongside school.

I'd forgotten about it and found it again earlier this year and got back to attempting to create games

Don't forget to set your variable to 8 before you run this common event.
Right, stupid of me ><

But this still doesn't change the fact that nothing happens when the cannon ball touches the player
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Thread closed due to user getting banned for using an illegal version of Ace.
 
Last edited by a moderator:
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top