thatserafimkid's Recent Forum Activity

  • Hunter

    You are close. Perhaps using a variable with name "ID" was a little confusing because it seems you've mistaken it for Object ID or UID.

    So in the Keys family you want to create a Text instance variable you can call it KeyName to make it easier for you. You don't have to create a separate variable for each key.

    Then click each key sprite seprately and you will see that they each share the new KeyName variable. You can change the variable value for each key sprite separately so then you can refer to them specifically in your code. So lets say for your C key object sprite you would set the value of KeyName to C. Do that for each of your other letters.

    Then in your code when Families 'Keys' is pressed you compare the KeyName variable. If it equals "C" then you play sound for the C key and so on.

    The array is just an easy way to hold multiple values. In your case because you want to hold multiple key combinations to solve your puzzle an array is the best option.

    An array has indexes which refers to the location you want something stored. It begins with 0 and goes on for however many things you need to store.

    So what you would do is in the start of layout is set each index beginning with 0 to the key combination you want. So if you wanted you puzzle to be DEC.

    You would

    set index(0) to "D"

    set index(1) to "E"

    set index(2) to "C"

    As you can see we have three items in our array so you would change the array width to 3 so it knows its holding 3 things. If you add more then you need to change the width to however many keys you have.

    Let me know if your still confused on any of this.

  • Hunter

    In my example if you want to just keep the three keys you already have all you have to change is the combination in the start of lay out event.

    It'll be easier for you in the long run.

    just change this code.

    if you only want two keys in the puzzle just have the top two. And change the value to whatever letter you want in the puzzle.

    So if you wanted C+C the code would be this:

    Then all you have to do is select the array object and on the right properties menu you change the width of the array to equal how many keys in you puzzle.

  • Somebody

    Thanks, I figured eventually he would want to do expert mode and have a whole keyboard set. LOL

    Hunter

    I updated your puzzle one step further and made the puzzle text display what was in the array. So instead of changing the text to match the puzzle you create in the array it will do it for you.

    Alternatively with this method you can set the puzzle to be generated randomly. Shouldn't be to hard. I'll let you figure that one out if that's something you'ld like to do

  • I gave your problem a shot. Take a look at my capx.

    All you have to do to add more keys is add the new sprite to the Keys family and set the ID variable to the key name. Then in the events add to the array index the puzzle combination you want and increase the size of the array. Let me know if you have an issue with any of that.

    If you just want to keep using the same three keys then all you have to so is change the puzzle combination in the events page. Just add to the array.

    Check it out.

  • Virtualistik

    I'm not sure why you had the set bit code in your input array. As soon as I took it off it seemed to work. Here check out my reworked example. The only thing I could see you having a problem with is trying to rebind the analog sticks. I'm not sure how that would be done. I'ld have to think about it. But I don't know if that's something you wanted.

    In the example click one of the Control buttons in the ui that you want to bind than click a button on your gamepad to bind it.

    What you would do is preload the array with the default bindings.

  • You're welcome. Good luck expanding on it. Can't wait to see what your game looks like. Just reuse the gravity shields. each direction has a separate ID that correlates to the direction. So as long as you copy the right direction you can use it on any platform. The inside corners is the only tricky bit. You'll have to give your platforms ID like I did. You can probably put all your platforms in a Family and give them a Family instance variable ID. You'll have to add the code for the inside top left, bottom, left, and bottom right. Right now I have top right in the code. So you can figure it out from there.

    Let me know if you get stuck at any point and I can always help you.

  • The image point so I can position the inside marker at the edge of the character. The InsideMarker is not a nose lol, Its needed to test collision when doing an inside corner rotate. All three markers can be set invisible and it will run the same.

    Self is just an easier way to refer to current object your giving commands to. Rather then write Sprite2.Angle I can do Self.Angle if my condition already refers to the object.

    The Angle is just an expression of the sprite object.

    Do a little reading in the manual about objects and expressions to get yourself familiarized.

    Try this for the jumping off the ledge problem.

    The purple half circle are what I call the gravity field. By increasing the size of those you can change how far your character can jump while still getting sucked down to the platform. Those can be set invisible. Easier to see the effect when they are visible.

  • Here's my take. Although I do like Burvey example.

  • Here, this should get you going in the right path. Just a tip use thatserafimkid , or who ever you are speaking to so they get a notification that you replied to them,

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I put together a quick example to show you how to do it. My method uses a Family.

  • Here I just threw this together really quick. Let me know if its what you were looking for. Should help you get started. Let me know if you have any questions.

  • If you select your dice sprite. On the left in sprite properties you can change the default starting frame for each dice.so you can use the same sprite copy it 6 times and change the default frame for each. Is that what you are looking for?

thatserafimkid's avatar

thatserafimkid

Member since 28 Mar, 2014

None one is following thatserafimkid yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies