Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Equipping Weapons Via Script.

LeWy

Member

I looked around in the eventing, and I couldn't find an option to allow myself to equip an item in the players inventory to a specific actor. There IS a change equipment event, but the players class changes in game regarding on the gender, rendering this useless, as I'm trying to equip two different weapons from the two classes. I'm trying to achieve this because there is a gender select option, and if you choose male, you are a rogue, and if you are female, you are a fighter.

When you choose male, I've made it so it add's a dagger into your inventory. For the female, I've added a rusty short sword. What I need it to do is for the item to be already equipped to the actor as soon as its added to the inventory when the player chooses their gender. (Pre-Game character setup)

My question to you is, How would it be possible to equip a weapon of my choice to an actor in the party using script alone, without even having to go into the equip item scene? I'm also using the Multi-slot equipment script by Guillaume777 too, so it'd have to be compatible with that.

Edit- I managed to sort it out myself by just simply swapping actors around when you start the game depending on gender.
 

Zeriab

Sponsor

I don't really understand the problem. Why can't you use the change equipment event command right after you add their weapon?
You have already succeeded in giving a different weapon depending on whether female or male is chosen.
Does the change equipment event command not work properly with the Multi-slot equipment script?
 

LeWy

Member

It's because the players class changes as well as the gender, which means you cant equip the character a dagger as they origonally dont start off as a rogue in the editor. The change weapon command only works for the current class that is selected in the editor.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top