nihakue's Forum Posts

  • I am running into some trouble with the method described. I think it's a pretty simple syntax mistake on my part, but I have two players, and each one is a different instance of the "player" sprite, with their respective "player_images" instance pinned on top. The problem I have is picking the proper player_images when an instance of "player" is picked. I gave them both an instance variable, "player" which is either 1 or 2, but when player 1 runs into a mob, both player_images still flash.

    Is there a simple way to give a particular instance of an object a preference for the player_images with the player instance variable which is the same as its own?

    Here's the capx.

    dl.dropbox.com/u/11790413/Final_Project.capx

    Edit: Wait, I think I figured it out. lmao

    This is what i did in pseudocode

    • is condition

    + is action

    -Player on collision with mob

    -Player_Images.player = Player.player

        +actions go here

    Seems to work ok. :)

  • Probably the best way to do it is this:

    Oh my gosh, I was so close. Hahaha. If you look at the capx, I'm already doing the exact same thing in the menu events, it just never clicked that I could do that for animations. :) Thanks sqiddster. Also, as per the platform tutorial I am already using invisible player rectangles.

    Once again, I love you C2 forums. :)

    Edit: They should put this post in the sticky. I searched for ages, and it's such a simple/powerful demonstration of using variables in expressions. May be useful to other people jsut starting out in programming.

  • There have been a lot of questions about character selection screens, but nothing that I can find about actually implementing multiple character choices in a game...

    Here is a copy of the capx I am working with, and you can see that in the "Menu" group, the player selects a character, but each character has 4 or 5 different animations, and aside from creating each of the four characters as their own sprite with four copies of all of the events

    For example:

    -mob collides with playerbox

    +player set animation to "ouch"

    would have to tell all four character sprites to animate "ouch", wouldn't it?

    How can I actually go about implementing multiple characters?

    Thanks so much :)

  • So here's the capx with ramone's code implemented. (use wasd to control the green block, but the camera follows the little dude, so use arrow keys to move him around)

    The orange block is the "challenge"

    dl.dropbox.com/u/11790413/Final_Project.capx

    Do 'or' blocks not work with key presses? so I could do :

    -'on 1 or num 1 pressed'

    Or should I just create a separate event?

  • Here's an idea using an array to store numbers entered on the num-pad:

    mathPlatformer.capx (r91)

    That's just about perfect. Thank you so much. What is the difference between push back and push front? I am imagining the array as a line of blocks, and push back means adding elements (blocks) from the right side, and push front is adding elements (blocks) from the left side. Is that correct?

    Edit: Man, this just makes sense. I freaking love C2.

  • well since its a platformer game why not make the player input the answer by jumpin on the platform with the right answer? or jump on a 10 platform twice and a 1 platform 4 times to get 24?

    Or you could always just take the simple approach and make a text input box appear and they type it

    The problem with using the text input box is: The game is locally multiplayer, and only one player will have to enter in numbers... The other player needs to be able to input controls while the numbers are being entered.

  • You can store a series of such strings within your array, then when you choose a random element out of the array, solve it using a special event sheet.

    Yes, it's math for children in 4th grade, so this sounds good. Could you explain how you would go about creating a solution event sheet? So if the prompt ends up being

    12 * 2 = ?

    How does the user input the answer? Sorry if this is all very basic stuff.

  • Hi all! I had one thread previously, and you were all incredibly helpful with that one, so I've returned for more excellent advice.

    I searched through the tutorials in the sticky and on the main website and although there is an Arrays tutorial, I'm not exactly sure that arrays are what I need. (they seem a little bit verbose for what I need...?)

    What I need:

    I'm creating a math platformer, and there will be an event where a player has to solve a math problem to proceed, and I am wondering what the best way to generate problems would be? Is there some way to procedurally/randomly create them? Should I create a list and then pull one from the list? How will C2 know if the player has entered the correct answer (with the numbers on the keyboard)?

    I know this probably sounds pretty basic to some of you, but I am new to algorithmic reasoning and these problems kind of stump me.

  • ramones Yeah, it plays no problem.

    I really appreciate everyone's help on this one. I haven't been able to find a solution yet.

  • Try Construct 3

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

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

    Everything seems to check out... I don't really know what I'm looking for, though.

    <img src="http://i.imgur.com/bdT7j.jpg" border="0" />

  • I played Skeletor in space and all I could hear is the ambient sound; no scream, no lazer, nothin. Very interesting. Gamekill are you running windows 7 in a bootcamp environment as well?

    JohnnySix I can watch youtube videos just fine, and even other Construct2 games will work (for the most part. I have found a couple that only load music and not sound FX)

    I will just have to test my games with firefox and hope that they are working in Chrome for most people. Thanks everyone for the help. Gamekill, maybe we can put our heads together and isolate the issue.

  • Bootcamp isn't a virtual environment (i think), It's an actual windows installation. But I agree that bootcamp is what is causing the issue. Because chrome works on the mac side of things.

  • Updated all my drivers. Still can't get it to work. Any other insights?

    I am going to download a bunch of different browsers

    Edit:

    So sound works when I use the latest version of safari! However html5 games in safari seem to run a lot slower...

    Edit 2: Latest version of Firefox also works. I guess it's a problem with chrome. Interesting. Maybe I will submit a bug report?

  • A development! I switch over to the Mac OSX side of my computer and load up the game via that dropbox link and the sound works?!

    I am more confused than ever.

  • I am so confused. Here are my complete specs.

    Intel Core 2 duo CPU 2.26 GHz

    2 Gigs Ram

    Windows 7 (32-bit)

    Construct 2 V84 (32 bit)

    Rendering with OpenGL 3.3.0

    -oh! I am updating my graphics driver now. That may be a thing.

    Edit: Nope. No joy. I checked and I have the latest audio drivers as well. :/ So strange. Everyone I send it to can hear it, but I cannot.