Kan's Recent Forum Activity

  • Some mobile browsers, especially Safari on iOS, won't let sounds play, especially music, unless the touchscreen is touched.

    If that's an issue with music, I'd try adding music files as sound files in your project and treat them as sounds. Might not work, but I remember I wanted to try that out and haven't got a chance yet.

  • It's obviously the bullet that's moving too fast, so it has the time to collide with two blocks before being destroyed. I tried picking the block nearest to the bullet, or picking the first block that records a collision, but it looks like everything's still going too fast to work out.

    The only other way I could think of with my tired brain was to perpetually detect which block is the lowest on the screen and store its Unique ID (UID), and then make sure the bullet can only destroy the lowest block. This method works in your example file, but it might need to be adapted to your real game, and it might also not work at all then.

  • It works, there is just a mistake in the URL, it's a http, not a https : http://lockegames.com/?shopp_product=paypal-plugin

  • Does it allow unlocking something already present in the game when the transaction is done (without having the player to download something or check their emails) ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, it seems that unlike the Mouse object, the Touch object keeps detecting coordinates even when the... well, the "touch" has left the window. This could be a workaround, but it implies that the player will have to be touching/clicking (and not just moving the cursor around).

  • That's cool.

    Personally, since I've learned that sub-events are executed one after the other, I like to separate events - especially functions - into several "steps" to make it more clear. As or variables, I like to give them the shorter yet clearer name possible, and have as little as possible to make it less confusing.

    In the end we both want our code to be simpler for when we (or somebody else) will have to look at it later, we just have different ways of doing it.

  • Well, let me remember... I basically removed a few "every ticks" conditions here and there (and left the events with no condition instead since they'll be processed one after the other in the function call anyway) and removed local variables (see file).

    Also I finally meet someone else who uses the latest stable release, instead of the latest beta.

  • codah This is a great way of doing it, thanks. And it seems pretty fast even when going through longer texts.

    I've simplified it a bit and I think that's what I'm gonna be using then. Thank you.

  • : The "find" expression would only return the index of the first occurence of the string inside the text, wouldn't it?

    codah : Thanks... I just looked over those solutions but I don't understand javascript enough to know what I'd be doing. Beside, I think that they only show methods to retrieve the number of times a string occurs in a text, and not the index of every occurence of that string. I might be wrong though, since as I said I don't understand enough of it to know what's really going on in the code.

    Magistross : Thanks, your example works fine. I get that I need to insert the string I'm looking for between the two \w* brackets. But I start being lost the moment I look at the javascript. I'd like to implement in a way so it uses or stores the occurences' indexes it finds instead of showing them to me in an alert message, but I don't know how.

  • Yeah, that's what I thought, but I hoped somebody would come with a simpler method. Oh well, it was worth the try.

    Thanks for replying.

    EDIT : Javascript, maybe. I'll check into that (or do you have a link to point me in the right direction? )

  • Ok, I can find the number of times a string occurs inside a text using the "RegexMatchCount" expression. But I can't find how to get every occurence's index inside the text.

    Anyone knows how to do this?

  • Works fine on my side. I copy and paste layouts and event sheets xml files and objects animation files from one project to the other, then open .caproj files in notepad and copy and paste xml code refering to plugins, behaviours, objects, families, layouts and event sheets from one .caproj file to another. Maybe that's what zenox98 calls "serious XML hacking", but hey, it works!

    But I guess using SVN or Git, as proposed by Ashley in that tutorial, could be even easier. In my case I'd need something that allows merging two different projects, and not two version of a same project. (I think some project merging utility could be made using Construct 2 itself. I might try creating that.)

Kan's avatar

Kan

Member since 2 Nov, 2009

Twitter
Kan has 1 followers

Trophy Case

  • 15-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

17/44
How to earn trophies