Pokemon Style Fight

0 favourites
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello my name is Baron first of all I love this program it is awesome it is what I have been looking for, for quite a bit of time. I am an artist that needed and easy way to bring my idea to fruition with little programing.

    Also if anyone needs some art done, I have reasonable prices and I am a freelance artist, check out my portfolio - Click Here

    Okay enough of that, I am trying to put together a Pokemon style fight scene and I am trying to start up the base part of it where I have a monster on one side and the Hero's pet on the other.

    1st problem is that I want to pull in a random monster from a list of monsters -

    2nd problem I want the monster to choose from a list of powers and then cast them on the Hero's pet.

    I understand that I can call from a .txt file with a list of monsters and have it call from that list. I having trouble understanding how to call that list then telling the program the list. I understand I have to have a .txt file that lists the monsters and then a .txt file with the list of the monster along with it's powers that the names line up exactly. I just don't know how to call it.

    Also I would like a little advice if this is a good way or would there be a better way. I am sorry if I have not explained it right, as said before I am an artist first and a programmer LAST haha.

    The construct File - Click Save As

  • Look, you posted a link it's wrong because .caproj is NOT proper compressed file.

    Try to change it for .capx

  • Im a little confused about the mention of a text file for doing what your trying to do.

    What you can do instead is use the random action within C2.

    It works like this;

    -On condition met

       >Set local number which = 0

        Set floor(random(3))

            Which = 1 - spawn this monster

            Which = 2 - spawn that creature

    This might not make sense to you right now.

  • Joannesalfa - Link fix it now contains a capx file.

    GenkiGenga - So how do I link what your saying to the monster sprite? And what if I have 50 different sprites to choose from?

  • Hey guys I would love some help on this.

  • Here, take a look at this:

    dl.dropbox.com/u/5143153/BattleDome-CallMonster.capx

    I don't think you need a .txt file. Just use array or variables. Or if you really need use a .txt you can ask somebody to make a plugin. You can use PHP with Ajax too, but i think this is too much complicate just for this. I made a simple modification in your capx. Like GenkiGenga said, use random() to call a random number, and then create conditions:

    -Var = 1

       > Monster_Spriter set animation to "MonsterName"

    Of course, there are lot of variables you'll need to use. Just made this example to help you clarify your mind. I hope this is it what you looking for, sorry if i misunderstood.

  • Zanuff - First of all thank you so much for the set up -

    That is Kind of what I was looking for, so if I was using the array I would create variables with the same name as the sprites? and then set it to call a random sprite? am I seeing that right? or would I just continue on with the list you have for every monster I had?

    also can I change it to instead of on click, to "on start of layout" so that way it automates it every time the screen starts up?

    Baron

  • I'm glad i could help you!

    Before i answer your question, do you know how to use array in Construct 2?

    scirra.com/manual/108/array/page-1

    I think for now you should stick with the list. When you are more experienced with C2, then you try to use arrays.

    And if you check the .capx, you'll see that i put an action in the "on start of layout" of yours. If you refresh the page you'll see

    the monster's sprite changing. I just put the "on clik" for better 'visualisation'.

  • zanuff - yeah the array thing, I am lost on that

    but I am understanding what you have done and working out how to change it up to do random selection, and adding in the variables thank you so much for help, I will post the file once I get a little further on it.

    baron

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For what you want to do, it's easier to use array, but let's stick to your 'guns' right now.

    For what i understood, you want to each monster have a pack of abilities right?

    Like, a Fire Lizard has the skills:1- Fire Ball, 2- Scratch, 3- Stun.

    And an Ice Golem has: 1- Punch, 2- Ice Ball etc..

    And, do you want this abilities for the enemies or just for the player?

    The way it is now, you can do like that:

    dl.dropbox.com/u/5143153/BattleDome-CallMonster-01.capx

    You have to come with the logic behind the A.I from the enemies. But now you have base to start with.

  • Wow! Thank you so much for you help, I notice now though when I click the button it isn't subtracting the damage form the health, I also moved the powers below the monsters and it still will not destroy them, how come? I wish I didn't have to ask you all these questions. But I am completely grateful for your help.

  • Sorry, i forgot to put "Trigger Once While True" in the events, so they'll just run once. If i not put this in the events, every time the stats of the monster will be forced to its default values. So when i put the once i will force to just run once. Or i could put then in a sub event under "On Start of Layout" condition. So the default values will just be set once in the beginning. Here, check the two examples to see if you can understande the diferrence:

    dl.dropbox.com/u/5143153/BattleDome-CallMonster-Trigger%20Once.capx

    dl.dropbox.com/u/5143153/BattleDome-CallMonster-On%20Start%20Sub%20Event.capx

    And i moved the condition "Monster_Sprite Health Less or Equal 0" from under the event "FireButton Clicked" so now the enemy is destroyed. Sorry if i overcomplicated everything.

  • Ugh, I was working your .capx but i stopped because Zanuff helped you, well i'm glad he helped you.

  • Ugh, I was working your .capx but i stopped because Zanuff helped you, well i'm glad he helped you.

    No problem Joannesalfa. I'm not too active here in the forums, but i really like the community, the people here are too newb-friendly. It's great to Scirra and to C2 itself to have a lot of people willing to help. :)

  • Hey Baron, sorry bud if you put an symbol before my name i would have got a notification you were talkign to me.

    Sounds like your on the right track, but for the purpose of learning here is a cap that explains how to use random. (This is not my example - I actually cant remember who initially posted it) But i did add a little note that might help you apply it to a different situation.

    dl.dropbox.com/u/13312935/random.capx

    How it applies to your monster spawning is: Whenever you want to make a random decision (like spawning a random monster) you could use this technique to let C2 only choose 1 action to take from many options.

    If you have 50 options maybe it would be better to use an array.

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