RPG Developer Bakin

RPG Developer Bakin

Checking for skills
Good morning, all!

I'm working on a feature in my game where if you defeat an enemy, you can obtain their skill. Is there an easy way to check whether the player has learned a specific skill - like a specific variable you can access?

For example, say I wanted to check if the player had already learned Fireball. If not, I'd have them learn it and then pop up a message saying "Player has learned skill Fireball!" Otherwise it would pass through the event. Technically I could do this by checking the value of a declared variable like "FireballLearned," but I'd rather just check against whether it has already been learned so I don't have to have an extra variable for every single possible skill.

Is this possible?
< >
Showing 1-2 of 2 comments
sylardean 8 Feb, 2024 @ 6:48am 
ATM I think the variable route is the only way to check if a skill is learned or not, as long as you keep your variable list organised it shouldn't be a problem though. Either way you're still gonna need a switch to check against the skill if has been learned (yes) OR has not been learned (no), in your suggested case above.. "FireballLearned" On or Off.

I'd suggest to use 1 switch variable at least per skill, this will make things much easier for you to control things such as scenes where a player might not be able to use certain skills in battle for say.. extra strategy/tactical additions to your battles for example. Though I totally get the pain it's going to be if your game is going to have a TON of skills to use in it, organisation of the variables list is key then to make things easier.
castlefreak76 8 Feb, 2024 @ 6:53am 
That's what I was afraid of. I even checked the Wiki and couldn't find a variable like that so I was hoping that maybe I missed something. It is what it is, though.
< >
Showing 1-2 of 2 comments
Per page: 1530 50