RafaelMatos's Recent Forum Activity

  • If you can replicate this in a sample capx it would be good. Not everyone has time to try and recreate the problem in a capx.

    edit: try this method. I've put in a button to toggle the 'in use' for each Customization. It retains the 'trigger once' and will work for any number of Customizations.

    [attachment=1:41z37w0b][/attachment:41z37w0b]

    If you want a simple checkbox it can be as simple as this

    [attachment=0:41z37w0b][/attachment:41z37w0b]

    I was complaining about myself trying to solve the question.

    I'll look at it. Thanks!

  • I'm losing my patience about this sh*t. I think i'll create a check object for each icon and then just play with visible and invisible checks. This not the best way to go but will work.

  • >

    It is way simpler if you do "Pick Nth instance" (System expression) then in your case pick 2nd (your limit).

    You can say "if pick second is not true" > "spawn" (a second) object

    thus never having more than two instances in the first place.

    If you need them to be there first, but then destroyed, do the same with "pick 3rd instance" > if true destroy. So you will always keep two instances of your object.

    I hope it helps.

    My limit is already being handled correctly by another event and everything is working. The problem that I'm facing is just the visual part where I must tell to the player that he selected an icon/customization. Just it. I think this logic doesn't work. This method will never get the first instance. Also I have to spawn the object when it's true not the other way and I need an automatic way because I don't know if I'll allow the player to select more than two in the future.

    razorMonkey

    I tried. It's the same.

    I can't share it because it's a published project. But there is no need because everything about the problem is shown in the pic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [attachment=0:1l9g3ziq][/attachment:1l9g3ziq]

    As you can see in the first event, I'm trying to create an object Check everytime an instance of this object is InUse (Boolean). I can have only 2 instances of this object with InUse set to True at the same time, so when I have only one instance with InUse as True, it runs once as it should be, but when I have two it starts to loop infinitly. The problem is that I can't figure out how to stop this infinity loop. I've tried other ways to do it but I'm too blind to see the solution because I'm on this for several hours and I stopped thinking many hours ago

    Thanks!

  • As you've said, images are loaded only in the layout which they are. So you have to load all of them everytime you switch layout. I think there are no other choice if you choose this way because that's how C2 works. I don't know how big is this cutscene and how it's done, but you might want to try working with layers on the same layout and load everything once. Doing this way, you will be able to run all the cutscenes with no need to wait between them.

    Edit: "since I assume memory is cleared when switching layout - could be wrong" - Yes, it is. All the objects that are not needed on the next layout that you are going to, are deleted from memory.

  • But I see. I don't know if you are those people that have no clue and who try to use a single/multiply full hd image on a mobile. I was one of them before reading all the Ashley's tutorials. Anyways, it has everything to do with what you mentioned. What increase memory usage on a mobile is the same on a desktop. Cutscene images are no different from a normal gameplay, with a full hd images or not. The same principles are aplied.

  • If you are creating this for mobiles:

    Try to reduce the overlapping area between them and never ever use large images. If you have a big object in the background, cut it into smaller images. Also crop all your images. The transparent/empty area counts as part of the image so it will use memory and cpu.

    If you are creating this for desktop:

    The same tips but you don't need to cut it too much I guess. And even if you didn't do all of this, your game should run easy in any desktop. 200mb of memory usage is nothing in a desktop.

  • So you want to pick 2 instances and handle them separately ?

    You can do :

    pick objectX by comparison

    for each objectX

    And you just have to add sub-conditions to separate them like : if UID = 0… then, if UID = 1… then, Or maybe just using an incrementing variable).

    Thanks, I'll try it later.

  • ObjectX.InUse is a boolean variable.

    Event======>+Pick objectX where objectX.InUse = 1 (This, in my case, will return 2 instances)

    Sub-Event==> -pick objectx instance 0 (pick first instance) > do something

    -pick objectx instance 1 (pick second instance)> do something

    I'm trying to get the first and the second instance of the list that I previously got in the first condition where objectx have two instances with their InUse variable = 1, so it will retrieve 2 instances. However, it's not working because i'm getting the first and the second instances of all instances. How can I separately pick these two instances regarding to the first condition?

  • > Admob, isn't it for flash games?

    >

    No, Admob is the Google owned ad revenue process. You place ads in your 'free' app or game and revenue is collected per user click. It can be quite profitable

    Yeah, like Flappy Bird's creator earning 50k per day LOL

    Btw, what's the difference between the admob oficial plugin and phonegap admob??

  • Well, I'm waiting . I'll test it directly so. But still worried because my first app (in production, not the alpha one) didn't appear in the playstore yet and it has been 3 days since I sent it.

  • I thought you said you didn't upload an alpha version?

    Yes, this is another version with leaderboard and achievements (phonegapgame plugin +gloogle play game service)that i'm tryng to test.

    I'm lost right now. It's says that everything is published. The production version and the alpha version, but my game doesn't appear in playstore search and I don't know how to update my game on my phone with the alpha version. I though it would be automatic since I'm the owner and probably listed as a tester.

    Also I'm very worried about the time it is taking to really publish my game. I've published my game 2 days ago and still doesn't appear in the playstore.

RafaelMatos's avatar

RafaelMatos

Member since 8 Mar, 2014

Twitter
RafaelMatos has 1 followers

Connect with RafaelMatos

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies