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.
2 handed weapon help, menu checking events

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 89
I began by creating a weapon we'll call "Broadsword".  Then I created a "shield" item called "x2 hand".  The following parallel process is in the Common Events tab:

-Conditional Branch: Variable [0002: Heroswordequip] == 0
 -Conditional Branch: Hero [Heroname] [Broadsword] equipped
  -Change Armor: [x2 hand] + 1
  -Change equipped Items: [Heroname], Shield = [x2 hand]
  -Variable: [0002: Heroswordequip] = 1
   -
 : End
 -
: Else Handler
 -Conditional Branch: [Broadsword] possessed
  -Change Equipped Items: [Heroname], Shield = (None)
  -Change Armor: [x2 hand] - 1
  -Variable: [0002: Heroswordequip] = 0
  -
 : Else Handler
  -Conditional Branch: [x2 hand] possessed
   -Change Equipped Items: [Heroname], Weapon = (None)
   -Change Armor: [x2 hand] - 1
   -Variable: [0002: Heroswordequip] = 0
   -
  : End
  -
 : End
 -
: End
-

What this does is if the hero equips the Broadsword, the x2 hand item is spawned into inventory and automatically equipped.  If the hero unequips the Broadsword, then the x2 hand item is unequipped as well and removed from inventory.  If the hero unequips the x2 hand item directly, then the Broadsword as well is unequipped.  If you want the hero to use only 2 handed weapons, simply lock the Shield location in the Hero tab of the database, and the x2 hand item will still equip and unequip itself as intended.

The problem I'm having is that while the menu is open, the game engine is in a pause state.  It does not check for events while the menu is open.  You will not see the x2 hand item equipping and unequipping itself along with the Broadsword.  Nothing happens until you close the menu.  Is there a way, maybe with a script, to make the menu check for common events?

***
Rep:
Level 90
~
Yeah, the advanced weapons script.  It's very annoying but yu can find the newest version early on www.rmxp.net

You'll need to read the guys post to understand how to work it, as I am too lazy to lay out the tutorial for the script here

**
Rep: +0/-0Level 89
I found it, thanks a lot!

After playing around with it for a few hours I pretty much have figured out how to get it to do what I need it to.  Some heros have the standard 1hand sword+shield setup, while others can replace both items for a stronger 2hand sword, while other characters can replace the shield with a second 1hand weapon.  The sheer size of the script though is simply mind boggling.  The guy who wrote this must be a robot.