Badmiracle's Forum Posts

  • Hey helpful readers,

    I am currently working on exporting my game to mobile devices (iOS and Android) and I would like to know how to create a save game feature which simply saves the users High Score, Gold, and In-App purchases when the app closes.

    I've noticed that the popular Save game action doesn't save In-App purchases (as written here: https://www.scirra.com/tutorials/526/ho ... -savegames). What does this mean exactly - are In-App purchases saved automatically? Surely there is a way to save the users purchases, could someone explain how?

    I am also looking at integrating Game Center for iOS score keeping and Google Play Leaderboards as well. I guess my main question is, why does this all seem like such a huge task, is there anyway to simplify all of this or am I over complicating it?

    Thanks guys.

  • Yes.

  • Sure. I am trying to add Mobile controls to a game that would otherwise be played on a PC using the Keyboard. So for movement I have:

    Right key is down OR (Touch.X > LayoutWidth/2 AND Is in touch) Then

    ... Do stuff for moving right

    Left key is down OR (User Touch.X < LayoutWidth/2 AND Is in touch) Then

    ... Do stuff for moving left

    etc.

    The reason I have to include "Is in touch" is because it appears that Touch.X may be true even if Is in touch is not..

  • I could - I was just trying to avoid having to call the actions multiple times. Is this a limitation of C2 btw? I'm thinking OR blocks shouldn't make the entire event use OR's but instead be condition specific.

  • What a great approach

    However, the conditions I'm using aren't simple expressions - they are Keyboard and/or Touch conditions. I am, not sure if it is possible to do something like "If right arrow key is down" in the first field. So, my solution is to set a boolean every time the right arrow key is pressed. Would this be an alright solution?

  • What I am trying to do in a single event is this:

    if THIS1 OR (THIS2 AND THIS3) then... do something

    If I make an event an OR block then it seems I cannot create AND conditions anymore. I know how to solve this with subevents but that would require me duplicating the actions for THIS1 and then THIS2 AND THIS3.

  • Try Construct 3

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

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

  • Seeing as I'm not 5 I don't really have a favorite color.

    What you can do is read up on the psychology of colors in branding.

    Maybe this will help: http://www.helpscout.net/blog/psychology-of-color/ - Might not be the best resource but scour google for better results.

  • Okay,

    So what would the order of the logic be?

    Sky starts off as light blue (frame 0)

    //22 Sky is Pink (frame 1)

    //23 Sky is Black (frame 2)

    //24 Sky is Gray (frame 3)

    This somewhat works but makes something weird happen. The left half of the game window background fades to the proper color but the right half transitions to the proper color instantly.

  • When the players score reaches a certain number I want the background to fade from Green to Blue, then when their score another number, I want the background to fade from Blue to Red.. etc

    Right now I have created a background object with the Fade behavior, and I have set the frames to the different colors, I've also been changing the background color of the layer but I am bit mixed up about the order to do things in.

    Is there a simpler way to do this?

  • ikke2902 Thank you again ikke. It is that unlerp line of code that I am not understanding. I'll have to read up on it a bit more.

  • ikke2902 Thank you very much for taking the time to do that. It works really well and I am sure this will come in handy for several people here.

    I just have one other question - do you know how to scale the same object based on its distance to a Player object?

    So when its position equals the player objects its scale will be 2 and when its position is say 450 pixels away its scale is 0.3.

  • I've been using a formula to scale an object with its Y value but I would like to know how to do it for a specific area on the game screen.

    The only time I want the object to scale is when it moves from a Y value 200 to a Y value 450. I would like to scale my object up from its initial scale of 0.3 (set On Created), to a scale of 2.

  • Both workable solutions. Thanks guys.

    I was embarrassed to even say what I had.. I was spawning bullets at random(1,15) image points, and then adjusting each bullets X by +/- 30.

    Anyways, now it's perfect. Thanks again you two.

  • I am trying to spawn bullet objects randomly along the top edge of a rectangular player controlled object.

    The problem is that the player controlled object can rotate a bit in each direction and is therefore at times angled. I have randomized the X coordinate to spawn the bullet at (along the player object top edge), but I am not sure what to do for the Y - it may have to deal with the slope of the angle? but I am not sure.

    I have tried to use Image points to spawn the bullets but I would rather not so that I can spawn objects at any random point along the top edge of the player object.

    Thanks in advance. I know this has been tough for me to figure out so kudos to whoever gives it a go.