thatserafimkid's Forum Posts

  • PixelBoss

    Would you be able to share your capx, or recreate the issue in another capx so I could take a look at this issue for you.

    I created my own player sprite and set text to image point and it worked perfectly. I couldn't recreate your issue.

  • virtusal

    The bump you see has to do with the collision box.

    I played around with your collision box and just made sure they all lined up with the bottom of the feet and the bump is gone.

    I also reworked the animation event a bit so now once you hit T it will play until the end before it changes to another animation.

  • You can do,

    Every X seconds -> Create enemy at X: random(Self.X - Self.Width/2,shadow.X + Self.Width/2) and Y: X: random(Self.Y - Self.Height/2,Self.X + Shadow.Height/2)

    That will only spawn the enemy inside the boundaries of your shadow sprite.

    That should be enough to get you started and you can expand from there.

  • Are you looking for something like this:

  • So do you basically want the car to always face the same way(compared to your screen) and just have the scenery turn around the car?

    You could do this by setting the layout angle to the car angle every tick. But with out knowing more detail about what you are trying to accomplish I don't know if that's the best method for you.

  • DagothUr

    Yes excactly. Just copy the distance code and make it smaller instead of 200 away. Make it whatever fits your animation.

    You're welcome.

  • DagothUr

    Hey check the capx out. All I did was add a distance check between your player and skeleton. Then if its less then 200 he will start following your guy. You can change the 200 to be more depending on his 'eyesight'

    Then I added a boolean to the skeleton to determine whether he saw the player and to start following him. If he's currently following the player he will ignore the collision checks on the invisible boxes. Let me know if you have any questions.

    You could also add an else under the distance event so he stops following the player if you are more then 200 away.

  • Look into the Phonegap Game plugin from Cranberry.

  • Is this what you were looking for?

    You have to pick the cube the matches the variable condition you are checking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • alextro

    That would be a really clean solution for this case. You would be right. I suppose it depends on how Hunter wants to use it.

    But in any case I went a head and created an example with tokenat instead of using an array. Check it out Hunter. All you have to do to change the puzzle is change the variable 'puzzle' to have the letters in the order you want. And then change where it says keycount = 6 to however many letters you have in your puzzle. Might be easier for you.

    Edit: I found a bug in the last capx I uploaded. If you hit the first key in the pattern twice to start off with it wouldn't continue the pattern. You would have to click one of the other keys first then start the pattern again.

  • You just have to repopulate the array once you get order wrong. Check out the capx. I did this by putting the array populate inside a group. The group gets activated on start so the array is already populated once you start the layout. But I also reactivated it if the key you pressed is not the next one on the list. You dont need the extra code to play the sound on every click. I removed that since it was already in there. I just took it out of the nested Key.ID condition.

    Somebody

    Aha thanks. I just like helping people out. He happened to get me on a day I'm not busy.

  • Create a global varialble like BossAlive. Set it to 1 when the boss dies. Put all your events you want to stop under Condition -> 'BossAlive = 0' -> ...Rest of your events

  • 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