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.

Common event help

I made a common event that runs on Parallel so I'm sure it will continuously run throughout the game unless turned off by a switch. What this common event does is it checks the hero's lvl using a controlled variable and theres a conditional branch in the common event that checks if Hero's lvl is greater than or equal to 15 (>=) it would automatically change the weapon of what the Hero's wielding and replace it with a different weapon (well, stronger one aswell) at anytime when the Hero reaches lvl 15. (I tried with Fixed weapon at first which didn't work then I made it unfixed but the common event seems to won't work)

Apparently this common event doesn't seem to work out for me and I am here to ask for assistant to make this event I'm trying to create work. Here's what I have on the Event Command:
Code:
@>Control Variables: [0001: Hero's Lvl] = [Hero]'s Level

@>Conditional Branch: Variable [0001: Hero's Lvl] >= 15 (Greater than or equal)

    @>Change Equipment: [Hero], Weapon = [Weapon 2]

    @>Conditional Branch: Variable [0001: Hero's Lvl] >= 25

        @>Change Equipment: [Hero], Weapon = [Weapon 3]

        @>

      :  Branch End

    @>

  :  Branch End

@>
 
Well, first of all, a Parallel Process common event will not run until you turn the switch on.


There's another point here-- I'm assuming that it's fine with you that the hero will only be able to use the high-level weapon, no matter what-- but that's secondary.
 
Ah sorry for saying this but I did found the solution to my problem. Apparently in order for the Change Equipment command to work, I actually needed to have the Item of the weapon I want to switch on my character's Item in order for the command to work.

@>Control Variables: [0001: Hero's Lvl] = [Hero]'s Level
@>Conditional Branch: Variable [0001: Hero's Lvl] >= 15 (Greater than or equal)
@>Change Weapons:[Weapon 2]+1
@>Change Weapons:[Weapon 1]-1

@>Change Equipment: [Hero], Weapon = [Weapon 2]
@>Conditional Branch: Variable [0001: Hero's Lvl] >= 25
@>Change Weapons:[Weapon 3]+1
@>Change Weapons:[Weapon 2]-1

@>Change Equipment: [Hero], Weapon = [Weapon 3]
: Branch End
@>
: Branch End
@>

The Red fonts are the commands I needed to add to make my system work. Anyway thanks for all the help.
 

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