Hey guys,
I’m trying to set up in-game shops for weapons, items and armour. The item shop should be simple because it’ll probably be preset items, it’s the weapon and armour shops I’m struggling with.
I’m working on the weapon shop first. I’ve set it up so it displays random weapons based on the player’s progression (still amazed I managed to do this without help...). I have a sprite with animations for each weapon, arrays that hold strings (part of the animation name) and the BHT Smart Random plugin to generate the non-repeating random numbers to select a value from the array. The progression system is a simple global variable that ticks up one every time the player hits the end of a level. I’ve just put a “1_†or “2_†on each animation for the weapon levels.
Screenshot: imgur.com/a/cBTjP
I’ve already set up the weapon swap system too.
Screenshot: imgur.com/a/D3Kqm
The problem I’m faced with now is; How to buy and equip the weapons?
The only way I can see is to have events checking which animation’s playing (“player†is overlapping “Wep_Shop†+ “Wep_Shop†is animation “1_Axe†playing== Subtract 30 from Coins + set “Wep_Num_Melee†to 2) but I’m going to have hundreds and hundreds of weapons by the time this game’s finished. I don’t want hundreds of events just for this system. Is there another way this could be done? Do I have to make it from scratch to do it right? Or is the only way to have hundreds of events?