JayZX535's Recent Forum Activity

  • scirra.com/manual/126/system-expressions

    Thanks so much! I didn't realize that was in the manual before, but I found what I needed and my program works now

  • Title says it all. I need to know how long a string is. Also, how can I access a specific character in a string? E.g. if my string is "Scirra", how could I select the third character and receive "i" as my output, or the fifth character and receive "r", etc.?

  • You can access specific Array slots using "Array.At(x,y,z)" and set specific Array slots using Array->Set at X,Y,Z or whatever.

    Thanks! It's working now

  • This is more a question of syntax than of anything else.

    Basically, all I'm trying to do is pull a value out of a set x-y position on a 2D array and set a variable to it (situation being that I have an array to store values of stuff in a shop for something and I want to get the price based off the current selection in order to show if you have enough money to buy it). How exactly would I tell it which slot in the array I want to access? (I know in C it's arrayname[x coordinate][y coordinate] or something along those lines- how would I do that in Construct 2?)

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, making good sprites isn't something you can just "do". It does take a lot of work (I'm not that good at it ), but it also takes practice.

    I don't really know what kind of art you're hoping to do (pixel, realistic, cartoon, a combination of several of those, etc.), but each kind is different. In any case, art takes a long time.

    My best recommendation is to look up lots of references of what you want to draw- all different types of references, too. The best example I can give you is the process I used to make a fairly realistic wolf sprite over the past few months. Over the course of making it, I looked at tons of pictures, drawings, runcycle animations, etc. Finally I ended up with a base I was proud of.

    It also takes a lot of practice, like I said. Don't get discouraged if you can't make something you like right away. I go through "spurts" of inspiration, as well as dry times when nothing seems to look right.

    Most important of all, don't give up! You're still young, and sometimes skills like computer drawing take time to develop. My computer art when I was twelve looked like BLAAA! Now it's gotten a lot better because I kept trying and practicing (I'm still a teen, by the way, so I'm not that much older than you ). So keep trying!

    Other advice:

    Check the tutorials- there are a few on drawing.

    Also look up Lostgarden- the person who owns the site made an AMAZING tileset that they're letting anyone use so long as they give credit if they use it. It's professionally done, too!

  • Another way of doing this if you want to toggle sound and music both:

    Personally, I would use a variable to do this. I'm not sure how you have everything organized, but I would create a global variable system that works sort of like this (let's say your variable is called "soundtoggle"- I'll explain how to code it in a minute). First, however, assume the following is what you want.

    When soundtoggle = 0, all sounds are on.

    When soundtoggle = 1, the game sounds are off.

    When soundtoggle = 2, the music is off.

    When soundtoggle = 3, both the game sounds and music are off.

    Then add in logic to your event sheets that will only enable the game sounds to play if soundtoggle = 0 or 2, and only enabling music to play if soundtoggle = 0 or 1. Then (using buttons, keys, or however you want it- I'll assume you want to use keys- "m" to toggle music on and off and "s" to toggle sound on and off- for now but buttons should work similarly, I am just not that familiar with them) make an event sheet to do this (assume that "if" simply means there is a new event):

    if "m" pressed:

    -----if soundtoggle = 0 -------- soundtoggle = 2

    -----else

    -----if soundtoggle = 1 --------soundtoggle = 3

    -----else

    -----if soundtoggle = 2 --------soundtoggle = 0

    -----else

    -----if soundtoggle = 3 --------soundtoggle = 1

    if "s" pressed

    -----if soundtoggle = 0 --------soundtoggle = 1

    -----else

    -----if soundtoggle = 1 --------soundtoggle = 0

    -----else

    -----if soundtoggle = 2 --------soundtoggle = 3

    -----else

    -----if soundtoggle = 3 --------soundtoggle = 2

    Does this make sense?

  • Do you mean when the user presses a button? E.g. They can mute the sounds and music separately?

  • Thanks so much! I know the syntax to do this kind of thing in C, but I wasn't sure how to do it in Construct 2!

    I'll go try it now

    Update: Thanks again! It works great now

  • Okay, so I'm a bit new to Construct 2, and I was wondering if there was a way you could join a string to an integer variable in the name of the animation.

    Here's basically what I'm trying to do:

    I have an integer variable called "speechnumber" which I use to control which dialogue box appears on the screen when characters speak. I also have a sprite which holds all the frames I want to display in the form of specific animations.

    Is there a way that, instead of having to write...

    System speechnumber = 1 set to animation "page1"

    System Else

    System speechnumber = 2 set to animation "page2"

    ...and so on and so forth, I could join the word "page" to speechnumber? And if so, what would I input into the "set animation" dialogue box to do so?

    (the page numbers and speechnumbers do coordinate- speechnumber = 1 is supposed to bring up page1 and so on)

    Thanks!

JayZX535's avatar

JayZX535

Member since 26 Feb, 2014

None one is following JayZX535 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies