player chooses to attack

  • hello good morning as dawn across the continent,

    I keep wanting to further my project.

    the situation is as follows:

    1. a gate of fire, to cross it must destroy it with water.

    2. a water gate to cross it must destroy it with fire.

    how could it,

    so my player can switch element.

    <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" />

  • All you need for that is a variable to keep track of which element your character is using.

    E.g if the variable is 0, the attack is fire. If it's 1, the attack is water. Then you just need a keypress event or some other way to switch between them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All you need for that is a variable to keep track of which element your character is using.

    E.g if the variable is 0, the attack is fire. If it's 1, the attack is water. Then you just need a keypress event or some other way to switch between them.

    mmm and how do I choose if 1, or 0 ... or power whatsoever.

    I mean, which is recognized as command use, and as 0 to 1 exchange?

  • I am very sad with you, but I could help with an example <img src="smileys/smiley4.gif" border="0" align="middle" /> <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Depends. Are you using a global variable or an instance variable assigned to the player character? In any case, the action you would want is "Set instance variable" or "Set global variable".

    If you don't know how to create those or where to find them, I would highly suggest going through the Getting Started Tutorial first. Also, the Manual holds an incredible wealth of information on all the features of Construct 2.

  • if I understand what part of the manual, except that I have to deal with bad translations, and I'm from Colombia and only speak Spanish.

  • The easiest way is give us the capx, and we'll fix it for you.

  • Here's a quick .capx for you, hope it helps:

    VariableElements.capx (r95)

    I used a global text instead of a number to make it easier to illustrate what's happening.

  • The easiest way is give us the capx, and we'll fix it for you.

    dl.dropbox.com/u/85024272/powerDoor.capx

    this is my .capx

    see doors and player

  • Here's a quick .capx for you, hope it helps:

    VariableElements.capx (r95)

    I used a global text instead of a number to make it easier to illustrate what's happening.

    tks!! <img src="smileys/smiley2.gif" border="0" align="middle"> <img src="smileys/smiley2.gif" border="0" align="middle">

  • Here's a quick .capx for you, hope it helps:

    VariableElements.capx (r95)

    I used a global text instead of a number to make it easier to illustrate what's happening.

    but you could look at the file you send and tell me as I could do.

  • > Here's a quick .capx for you, hope it helps:

    >

    > VariableElements.capx (r95)

    >

    > I used a global text instead of a number to make it easier to illustrate what's happening.

    but you could look at the file you send and tell me as I could do.

    this is.

    db.tt/GeNj9do3

  • I'm sure you understand I don't have time to make your game for you.

    If you have any questions about my example, feel free to ask, but you will have to add it to your game yourself.

    If you don't understand how it works, you should follow tutorials, look at examples or read manual entries.

  • ho well maybe I misunderstood when I said that would put the. capx,

    Like mind thank you very much for the help it has helped me a lot.

  • If you have encountered a problem you can't solve, it's great if you post your .capx, then someone can look through it and fix that problem for you.

    But if you're looking to add something new to your game you should at least try yourself first. If someone just adds it to your game for you, you don't learn anything from it.

    So you should try and understand what's happening in my example, then try to implement it in your game. And then, if you have specific problems, post a question here in the forum.

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