j0hnbane's Recent Forum Activity

  • I made a quick example, that pretty much encompasses what I'm attempting to accomplish.

    After loading the JSON, the player clicks on the item.

    Trying to set the instance variable "ATK" on the player to the animation, "ID_1", over one spot to the value of "10".

  • Thank you for your response, beufreecasse.

    I've entered that for my variable value, but I'm getting a return of '0' when its updated.

    This is what I have entered on my event sheet using the array I posted earlier.

    https://www.dropbox.com/s/jsezcqmlxqi0isk/function.png?dl=0

    This is pulling from the array I linked prior.

    Am I doing something wrong?

  • I'm having a problem trying to figure how to pull a value from a y column picked by the x of a string in an array.

    Here is my array.

    {
    "c2array":true,
    "size":[3,4,1],
    "data":[
    [
    ["weapon"],["Anim_Name"],["ATK_Mel_Max"],["ATK_Mel_Min"]
    ],[
    ["Longsword"],["ID_1"],["10"],["4"]
    ],[
    ["Axe"],["ID_2"],["9"],["6"]
    
    ]]
    }[/code:18h7gpyd]
    
    I have an object that has different animations(different weapons). They are identified by "ID_0" and so on. When a player equips a weapon, I want to pull from an array the stats of the weapon by its animation identifier, In this case "ID_1" or "ID_2", and place the needed integers in the character's variables. In this case "ATK_Mel_Max" and "ATK_Mel_Min".
    
    I've been reading on 'For' and 'token' the past two days, thinking that something needs to happen there, and really haven't figured out a way to get this done. I've done several tutorials on loops, but haven't really found an application here.
    
    Thank you for your time.
  • Thank you for the response CJK with screenshots and a link. I just got home from work and will be attempting this now.

  • Good Morning,

    First off, hello Scirra community! With my learning of Construct 2, I've made heavy use of Google with Construct 2 in the field and also the forums. It has helped me immensely in deciphering the logic needed to create. I've done, what I feel, a thorough search of the forums/tutorials and haven't been able to find a straight enough answer for the basics of these two problems I'm having.

    First:

    I'm trying to add all values in the (x,1) area of the array.. All values in the x width of the y=1 heighth. I want to get the sum of them to set the value of a specific variable.

    I've seen examples some where multiple actions were done containing this, but I'm unfamiliar with it and couldn't break it out.

    _________

    Second:

    Another thing I'm trying to accomplish is a command that pulls a random number. The next time the random is run, it excludes any and all numbers previously ran by it.

    Let's say I have this:

    On Left Click on Object - set Array.At(CurrentAnimation.AnimationFrame, random(0,53))

    Let's say that the random(0,53) gave us an number of 42.

    Then, the next time any of that object type/family is clicked, How do I make the random(0,53) make an exception of '43' and any other numbers if it were clicked again?

    _________

    Please let me know if this vague and I need to do a better job at explaining.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would be interested in seeing this example if you could.

  • This is a link from the "How Do I" thread. There is no capx available anymore.. =(

  • I hope this is going well for you. Your inventory tutorial led me here.

  • Its funny when you wait so long to post something. Then within the time you wait for some feedback, you generally answer your question. I did these modifications and got the movements I was looking for. Only I haven't cleaned up the "Kitty Corner" movements when two keys are pressed (e.g. Left Arrow + Up Arrow).

  • Hello everyone.

    I am new to Construct. I've been familiarizing myself with it for the past week and a half. There is an awesome community here and an excellent amount of information that comes from it. I'm working on an overhead style adventure rpg. I'm using zelda pixels right now to attempt to learn the event editors (something familiar helps me start).

    So, here is my cab file:

    http://www.box.net/files#/files/0/f/0/1/f_687788496

    Nothing more has been started but the movement test. I've been fiddling with this for about 4 days now (yeah, I'm a noob.. we all are at one time). I'm still wrestling to get the results I want.

    I'm trying to make it so when I press a direction it changes from a standing animation to a moving one. When I release, it returns to the original one. I've tried several different ways, so any suggestions would be appreciated.

    I know this is really basic stuff, but this would help me get along my way tremendously.

j0hnbane's avatar

j0hnbane

Member since 31 Mar, 2011

None one is following j0hnbane yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies