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.
[GM] Weapons!

0 Members and 1 Guest are viewing this topic.

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
How would I make weapons in a platformer? Like a throwing object that you need an amount for, like ammo. And a combat weapon, like a sword. Also, how would I go about making it so the monsters having certain health?
« Last Edit: March 04, 2014, 01:42:01 AM by modern algebra »

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
No one likes me? :(

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
I doubt it's that people dislike you. hahaha. I'll make an example for you when I get a bit more time. My brother's home from college and he's working me like a slave on our game. I will try to help a little now though.

As for monster health. All you need to do is create a local variable and call it health or something like that. then decrease it when the monster gets hit.

For the object that you want to shoot and have ammo, you need to have a variable (generally local) that keeps count of ammo. Next, say you want it to shoot when you press the space bar. You'd go into the object properties and make an event for "key pressed" and click space. Here you should check if the variable you set for ammo is greater than zero. Next create an object for a bullet or whatever it is that you are using ammo for. In this object make how it'll move. Then go back to the player and under the "press space" event create one of the object that you made for the bullet. Next you need to go into monster objects and tell it to lower the monster health variable. Then make a check, where if the monster health variable equals zero, destroy the monster. I know it's not a very good description but I'll make an example later.

And for the combat weapon, I'll show you in the example. It's too difficult to explain.
« Last Edit: February 21, 2008, 02:45:38 AM by J-Crew »

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
I know people like me, just using a bump because all the views and no posts  :tpg:

********
Absolutely the one chosen by fadark
Rep:
Level 94
GAAAAAAAAY
Basically what I did for a sword, was I had when you press the attack button; shows the characters attack sprite, and creates an invisible object that isn't solid, in front of the character, and this object causes damage for any enemy touching it.  As soon as the animation is over, I had the damage object delete itself.  It worked well for me, I'm sure there is a much more efficient way, but that way is easy and simple.