Allardje's Forum Posts

  • Hi guys,

    I have the same problem using CLI 5.1.1 Runtime 15.

    I am getting worried since the deadline is May 9th.

    EDIT: Just found out that apps don't stop working on that date but you can't actually update them anymore ( the way it gives the error ).

    Is there a fix for this?

    I actually released the app just yesterday and the error showed up today.

    Pretty concerning if you ask me..

    Did read this somewhere on the intel forum tho:

    "We recommend that you move to CLI 5.1.1 now so you can prepare for moving to CLI 5.4.1 when it becomes available. CLI 5.4.1 will definitely resolve this issue and it will definitely be available before May 9. Please re-read the original post for full details."

    Guess it's just hoping they are on time from now on isn't it?

  • Alright! Massive facepalm time !

    I actually created the system before with some bugs. Thought to throw it all around and re-create it ending up in this mess.

    Finally figured it out how to do it. Thing is, i had it almost completely right the first time.

    Anyways this is how.

    Instead of checking how many comments there are for creating the comment blocks i simply check if the comment is empty or not ( duh! ).

    So if comment 1 and 2 are there, it will create 2 blocks. As comment 3 is empty, aka does not exist, it will stop right there.

    Now for the 3 comment limit, that's why i put up a limit in my php script in the first place. This is also how i check if my comments are empty.

    So all there was left was the "next page" button.

    This i've done by:

    ceil(commentCheck/3) =< commentPage > Delete button

    ceil(commentCheck/3) > commentPage > Create button

    Problem solved .

    Thanks for the brainstorming with me .

    This is what it looks like:

    variable l1 and l2 are the limits i send to my php script, so it will only show 3 comments.

  • I've been thinking that way but the thing is that these comments are getting fetched from a database.

    I know i might have high hopes but if this app really works out it could be possible that 1000's of comments will be added.

    There is no way i can pre-load 5000 comments creating 5000 objects. Somewhere i have to cut it off anyways.

    It's also getting late for me i will re-think this trough tomorrow.

    The combo semi-knowledge of Construct 2 and almost no knowledge of math formulas kills it for me .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, i indeed really have trouble explaining my question since i don't understand it myself .

    I indeed want to switch to a new comment page each 3 comments. That's why i have 3 different formula's. I think this is needed because first it will show comment 1,2 and 3. Switching pages should show 4,5,6.

    The reason i think this is the only way is because it's possible to have like 4 or 5 comments. If for example the case is 4 comments it should not trigger the second and third formula after switching to the second page. Because that would create a object for comment 5 and 6, which obviously do not exist if there are only 4 comments. That's why i need to know how to get do a action each 1,4,7 etc.

    Some images:

    This is the result for one comment

    This is how my php script shows how many comments there are

    In the database ( no clue why i shot this screenshot )

    The comment background object is created because of this

    When i added another comment

    Because my php script showed there were 2 comments

    As you can see in the screenshots everything works as planned.

    If i add a third comment the third comment will show up.

    Once i add the 4th comment none will be created. This is where it goes wrong.

    So, if i got 4 comments my php script will result a 4. Just like the 1 and 2 shown above.

    The fact is that i first want to run the formulas for 1,2,3. After clicking the red arrow at the bottom of the screen i want to show comment 4.

    So in fact comment 4 would be on page 2.

    So if i take this image:

    What it should do, if we take 4 comments, is running all 3 actions. Once i click the "next page" button it only has to run action 1 again since that will add up to 4, aka the amount of comments. So if we take 5 comments for example. It again, has to run all 3 actions. After clicking the next page button it will only have to run action 1 and 2.

    P.s. Don't mind all the other info at the php script. This i can assign to each comment block once my issue is solved.

  • I see, i never really had math and i kind of know nothing about it.

    I see now that if you calculate 3*1-2 = 1, so indeed 3*2-2 = 4. These are indeed the numbers i am looking for!

    I'm still a little bit stuck though.

    When it comes to math all i get are brainfreezes. I just can't figure it out .

    What i did now:

    IF > commentCheck = 3*commentPage-2 > Do action

    IF > commentCheck = 3*commentPage-1 > Do action, Do Action

    IF > commentCheck = 3*commentPage > Do action, Do Action, Do Action

    commentCheck = The number of comments

    commentPage = The comment page

    I think i'm stuck at the pages.

    If i got 1,2 or 3 comments everything works perfect as mentioned above. Now the problem starts having a 4th comment.

    If i have 4 comments the formulas above don't work anymore if the commentPage is still 1. This makes sense but i am not sure how to switch over.

    Even if commentCheck = 4 but i am still on comment page 1 it should show the first 3 comment.

    The information is always right in my php script no matter the page because i use limit 0,3 if the comment page is 1, i use limit 3,6 if the comment page is 2 and so on.

    So my information is always correct in my script.

    So if i have 4 comments but commentPage = 1 it should read it as 3 comments. Once a user hits the "More comments" button commentPage will be 2.

    My conclusion: commentCheck = commentCheck(4) - commentPage(1). So if i have 4 comments, and i'm on page 1, it will be counted as 3 and it will create 3 comment blocks.

    If i go a page up, the new calculation will be commentCheck = commentCheck(4) - commentPage (2) which results in 2. This is incorrect. Because it should be 1.

    I am really not getting the clue here .

    My code so far:

  • Hi!

    I need to now how to use a specific calculation.

    I want to do an action each 1,4,7,10th step etc.

    Now i found out the formula for that would be "3n-2".

    Thing is, i have no clue how to use that in Construct 2.

    Is this possible to do?

    Thanks!

  • Are you bloody serious? Chrome has this feature? This is awesome!

    Thanks for the help! This explains why everything was centered to the left with everything i created.

    I will try this right now and let you know how it ends up.

    I would be so happy if this works out great since that was the only thing i was worried about. Will check back in later .

    EDIT: Oh god this really works!

    Thank you so much! Now i can really finish my app exactly the way i want it.

    P.s. i don't know what you are working on at Intel XDK but i really like the name

  • That could be possible! I think scale outer could do the trick in combination with the parallax.

    So what i should do is:

    • Scale Outer
    • Background parallax 100,100
    • All content layers parallax 0,0?

    Wish i had something to test it, i only got 1 phone which has the 720x1280 resolution so for me it always fits.

    I was not sure because i remember a game i made like a year ago and it would simply align all content to the left which made it look pretty ugly.

    And i always used Scale outer.

    I wish i could say that i'm going to try it but i have no idea how without buying a phone that has a different resolution

    Is there any tool to check different screensizes? Like a emulator i can trust that it displays the app the exact same as on a phone?

  • Hi!

    I've read a lot about screen resolutions and stuff but still i am not sure what way to go.

    I do know how i want to work with screen resolutions but i am not sure if this is possible.

    Let me explain with a image.

    As you can see the content will always be centered, and the sides will just be wider a.k.a more is revealed since it will be designed that way.

    The red line is a 720x1280 resolution.

    The white outside is a 1080x1920 resolution.

    Everything within the red lines is content.

    My goal is to actually have my content always centered. If the screen resolution changes i want it to simply take the space outside the container. So if for example the screen is wider than the 720x1080 resolution i want my game to take the left AND right AND bottom area that is outside the screen.

    Example on phone

    Is this possible? And if yes can any one get me started on how to reach this goal?

    Thanks in advance!

  • Hi!

    I am working on a app which works like a charm but i have bad thoughts about the safety.

    I actually fetch a lot of data trough AJAX requests via .php files on my server.

    Now everything works as expected but i want to know if there is any way to only allow my app reading the .php files. Is there any way i can identify my Construct 2 project to my php scripts so the script won't be accessible by browser but only by my app?

    My method at this moment is very straightforward and everything but safe:

    AJAX > Request - domain.com/scripts/phpfile.php?variable1=1&variable2=2

    As in the PHP code i connect to my database, get my info and echo it back.

    For now this is great to test everything and set up a working project but as you know you can simply access the php scripts once you know where they are and for that i feel not safe. Some one with bad intentions could crap up the complete database with no hassle at all.

    Any good solutions?

    Thanks!

  • So,

    I'm bumping up my 2 year old thread .

    In this 2 years did something make this possible?

    I am still interested in creating wallpaper applications.

    Is there any way we can create a "Set as wallpaper/background" button these days?

    Thanks in advance!

  • Thanks both for your answers!

    This time i was so close! I did read some things about tokenat.

    What i tried was: "Exp"& tokenat(Dictionary.Get("expTable"),0,",")

    Got the right explanation now ! Thanks!

    EDIT:

    Oh wow, i actually had it all this time before ( as shown above ) the thing is i just hadn't set the key itself yet

    Though this explanation is pretty clear to understand since i had no idea why it was working !

  • Hi,

    I am not sure what the best way is to do the following:

    I am creating a level up system in my game and i am not sure what to use ( array or dictionary ) for my needs.

    I have a level up table, for example: lvl 1 = 83 exp, lvl 2 = 150 exp, lvl 3 = 300 exp.

    Now what i tried to do is creating a dictionary with a key named: expTable.

    As key i added "83,150,300".

    So the result is like:

    Dictionary > Add key: "expTable" value: "83,150,300".

    Is there any way to get for example the "300" in that array? I can not find the right solution.

    I need something like: Dictionary > Get key "expTable(3)". As where the 3 would be the third number in the "83,150,300" value.

    Any help is really appreciated. Thanks in advance!

  • Alright this is very akward but i just tried "Spawn another object" instead of "Create object" and that works somehow.

    I wish i knew why. Any one here having a explanation why spawning the object works instead of creating it?

    Would be good info for my learning curve! Thanks!

  • Hi,

    I have a issue and for a few days now i can't seem to fix it.

    I've looked up some stuff on creating multiple instances of 1 single object but yet i can not fix it.

    The issue is the following:

    I have multiple enemies which are getting spawned over time. Each enemy will walk around and once into a specific area ( a sprite ) it will start to attack.

    The attack is simply a: Create object on enemy. This attack is a animation ( a slash ). Now this works but for some reason i can't get multiple targets to attack in the specific range. To destroy the "Slash" i use > On animation finished > Destroy. I think this actually destroys all the animations..

    This is what I've done:

    The result is that if multiple enemies are in range ( overlapping the "attackRange" sprite ) only 1 will attack. So it seems. All sword will become invisible and visible though. Only 1 slash animation shows at a time.

    What i need is that every enemy will simply attack and has it's own Slash animation.

    I can't upload my .capx since it's a part of a whole game.

    Thanks in advance.!