How do I Create Skills for my characters and enemies?

0 favourites
  • 8 posts
From the Asset Store
Background Story generation templates. See the Arcade demo.
  • Heya all! im kind of new in construct and this is the thing , im trying to make a strategy turn-based RPG (kind of front mission for PS1) but i cant find the correct combination of expresions to create Skills ...and i believe i will have a complication or two more...but lets try to solve this one first hahaha...any ideas or pointers?

    Thanks all for reading and helping!

  • It depends on how complex you need those skills to be.

    If it's just "Fireball Level 1-10" then you can use a simple instance variable "FireballLevel", set it to 1 and then increase this number as your character levels up.

    If it's a complex skills tree with various upgrades etc,, you might need something like a dictionary or an array for this.

  • Hey Keus!

    If you just have a list of skills which increase in level, just use a dictionary which an entry for each skill and entry value for level. If you need them to have dependencies, like a skill/talent tree, use an array to store skills, their levels and their dependencies.

    It's hard to be more specific without more info on your project.

    Hope that helps. Cheers!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • WoW! i really didnt expect ppl to actually answer me this fast!...first of all thank ou both for answer me i really apreciate, and well for the "hero" it would be nice to have a talent book (just a few skills inside that book) and for the enemies i would like them to have only 2 or 3 skills (and this is my other problem) how can i make them decide to (for example) attack or heal them selves or defend??.

    dop2000 you said something bout a dictionary right? theres any post bout that u can recomend me to read?

    bruno my project is almost like front mission for PS1...tactical battles but u have your own skill talents tree u can learn spells from there ,and the enemies only have 2 or 3 skills ..i been looking for some IA tutorial but all i could find was like a tower defense xD

    well thanks again for reading me and sorry for the prehistorical english (im from Argentina doing my best haha)

  • Google "Construct 2 dictionary", there are a few good tutorials.

    Put Enemy object and Skills dictionary to a container and you'll have a unique skill set for each enemy.

    Your entries in the skills dictionary could look like this:

    Key: Fireball Value: 3

    Key: Poison Value: 0

    Key: Heal Value: 5

    Writing an AI for enemies should be an interesting task. You can start with something similar to this:

    If enemy.health<50 & Skills.Get("Heal")>0 // then use heal spell

    else If Skills.Get("Fireball")>0 & Player.fireResistance<50 // use fireball spell

    else If Skills.Get("Poison")>0 & Player.poisonResistance<50 // use poison spell

    else // use normal attack

  • Dop2000 thank you again bro!!!! gonna check it out! , you said something bout writing an IA and then just gave me a few examples...since im a noob with construct 2 can u tell me please where i can write that? or its just an example with events in the event sheet??

    Thanks!!!!

  • Yes, all your AI code will be in event sheets. You need to read a few tutorials to get a better understanding how everything works in C2.

  • yeah im on it already i actually like this engine XD hahaha i already found a good dictionary tutorial with images and stuff haha

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)