RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Make projectiles and show life bar on screen? (Rpg maker 2003)

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 76
RMRK Junior
I just registered, and i have been wanting to find a answer to this for a while. so please dont freak if someone just asked this 2 pages ago.

I am making a Zelda game so I want to know how to make a item like a bow that when you pick it up allows you to shoot arrows which can also be items. this is not in a battle just on onscreen. i dont know if this is possible though

also i want to know how to make a life bar appear onscreen. like the Hearts in a zelda game.

**
Rep: +0/-0Level 76
RMRK Junior
Hi. I'm pretty new here myself, but I stumbled upon a pretty awesome thread which talks about making a status box to keep track of your hit points (and you could easily expand this to keep track of arrows and stuff, if you're clever). Unfortunately, making a custom battle system with a bow... that's a bit out of my league, I've been searching for a simple tutorial on how to make a CBS, but haven't found anything that's "dumbed down" enough for me yet. :P Anyways, check out the link...

http://rmrk.net/index.php/topic,30282.0.html
An nation's brave captain must choose between his morality, and what he knows is right.
A village handyman on the run must learn fast the way of the sword, or die by it.
A farmer's daughter is captured, abused, turned into a mad woman.
A ruthless queen is forced to kill her own people to save thousands of lives.

Yeah my game is gonna be cool. I'm still learning, though. :)

******
Rep:
Level 91
Well the general idea (which you can then implement with the help of the tutorial I suppose) for both would be:

1. Make 2 common events, one for your attacks, one for your hp bar.
2. Swarm your maps with parallel events that trigger them
3. The hp bar is simple, you can use the Zelda style by pretending every X hp is 1 symbol or half a symbol
So simply make a symbol, say a heart and make it so that for every X hp the event will draw on the bottom left one of those symbols, every run of the event the symbols will be erased and redrawn
You probably want to put a "wait 1 second" command at the end of the event.
(you can also use pictures for the images as suggested in the tutorial)
4. For the weapons it's a bit trickier, first the attacking event - you use "if button S was pushed" then you draw a picture of your shot (Fireball, arrow, you name it) and trigger an event that will move it to the direction your character shot it. (and of course just as easily remove the picture after X cells)
[Note that this is harder than in the guide, the guide suggests you simply hit regardless or so it seemed to be in brief reading, What I am suggesting here is to actually allow real-time dodge]
5. This is the tricky part, actually dealing damage, you can make your parallel event check if the image is touching any enemy on the screen, the reduce it's hp or something and make the shot disappear.
Or you could put such handler on every shootable NPC on the map.
When their hp goes to 0 (a variable) set a flag that makes them disappear.
6. Now you make an arrow item... well pretty much get an arrow sprite (you'll shoot it too) and make a misc item called arrow, nothing special.
7. Scatter events that have "upon hero collision" trigger or "when hero talks to..." or whatever, trigger a flag that will make them disappear from the map and add 10 of those said arrows to your inventory
8. back to the shooting  thing, every time you shoot an arrow remove one from your inventory, if you cannot simply don't shoot (condition the whole image appearing part with the successful removal)
9. just like the hp bar either make arrow symbols or number symbols or whatever you feel like.


Hope that made it a bit more simple.
« Last Edit: July 07, 2010, 06:41:19 AM by blueXx »
holy shit my sig was big!

**
Rep: +0/-0Level 76
RMRK Junior
Okay thanks :)

Cant you use a frame for the HP aswell?

******
Rep:
Level 91
Okay thanks :)

Cant you use a frame for the HP aswell?

Frame?
Not sure I understand you, but are we talking hp bar?
If so it's the same as using hearts or digits, you constantly draw an empty frame and then for each 1% of max hp you have you add a thin red line image that takes exactly 1/100 of the hp bar. (Calculate the current hp % and make a loop to add the red lines close to each other for every single percent of hp you have)
You can also use number images and a % image on top of the said bar.

Of course if you just meant you want to frame the hp... then...draw a frame before you draw the hp itself (whatever style you might choose) and draw whatever on top of that.
The frame is an image too.
holy shit my sig was big!