rbaron's Forum Posts

  • 12 posts
  • Hello all,

    I'm having a strange little problem with a project I'm working on where the game gets stuck on the loading screen on iOS (iPhone 5 and IPad 3, each tested with Safari and Chrome). It works perfectly in Browser and on my Samsung tablet, in addition to my friend's Windows phone.

    [attachment=0:efhfa2xc][/attachment:efhfa2xc]

    Before yesterday, it worked very smoothly on both of these devices. The only major change I made was adding about a dozen short audio clips to the project. Could this be the cause of the problem?

    I'm running the game by uploading it to my website, which I would post here but my reputation isn't high enough.

    Here are the debug stats on my iPhone 5 (previewing over local network):

    [attachment=1:efhfa2xc][/attachment:efhfa2xc]

  • Hmm well I know there's a solution so I'll keep looking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm... you never found a solution? It seems like a fairly basic thing to do so it really shouldn't be that difficult.

  • I know I can use the set CSS style action but whenever I changed "color" or "background-color" it doesn't seem to do anything!

    Thank you in advance!

  • Thanks for the reply but I've read the documentation and what it explains seem to contradict the behavior in my project.

    According to the documentation, my function's variables (the Solder IDs) should be unique to each time the function is run. However, when the project is run, the variables are overwritten by more recent calls of the function.

  • Thanks for taking the time to look into my problem! I've fixed the problems that are causing the function errors. I guess it was because by the time the wait was complete, the function params didn't exist!

    I'm still trying to figure out how to prevent newer instances of the same object type interrupting the recursion on my function. I've posted a new topic on it where I think I explained myself a little better (and provided a capx with no foreign plugins).

    If you search "A question about local variables in recursive functions", you should be able to find it (can't post links yet).

    And yeah, Store Reference seems really useful! Unfortunately, I don't think it will help me in this situation.

  • Do local (non-static, non constant) recursive function variables get overwritten when another object calls that same function?

    To put it another way, I have an object type that I want to perform a given function over and over again until a set point but whenever another instance of that object type calls that function, the first object stops its recursion.

    I've attached a screenshot and my capx to show the specific problem I'm having.

    [attachment=0:1k3nx9zt][/attachment:1k3nx9zt]

    [attachment=1:1k3nx9zt][/attachment:1k3nx9zt]

    Thanks!

  • Here you are!

    [attachment=0:17oarr1r][/attachment:17oarr1r]

  • Hmm... that didn't seem to have any effect.

    Updated code for reference (also cleaned up a couple things):

    [attachment=0:1q3fql2l][/attachment:1q3fql2l]

  • Hey all,

    I'm having trouble with running a function that needs to run across multiple instances.

    Basically, I want each soldier to call the "Attack" function, while passing in the Attacker and Defender as parameters. What I have below works fell for 1 pair of Soldiers, but as soon as I include more, that's when I run into problems.

    If a pair is fighting, as soon as a new pair collides, they override the function and the previous pair stops fighting.

    My question is, how do I get the objects to run the functions independently of one another? I had the variables set to non-static before, but they were getting reset to 0 and I therefore couldn't recall the Attack action for them to continue fighting.

    Any help would be appreciated!

    EDIT: Would the Store Instance behavior be of any use here?

    [attachment=0:1ruc293l][/attachment:1ruc293l]

  • Thanks for the quick response!

  • Hello everyone!

    I'm a Unity guy coming over to try Construct 2 and I'm trying to carry over some of the object-oriented organization.

    For most objects with logic more complex than simple behaviors, I want them to have their own event sheets to avoid having one huge event sheet. I have 2 questions about this approach:

    1. Will this have an impact on performance? I read through an article about performance tips but it didn't mention anything about multiple event sheets.

    2. If most people don't take this approach, what is your workflow? Do you just separate different areas of your game logic through the use of headings on one giant event sheet?

    Thanks for your time!

  • 12 posts