TiAm's Recent Forum Activity

  • edit: whoops, codah beat me to it! <img src="{SMILIES_PATH}/icon_cool.gif" alt="8-)" title="Cool"> But...I have a capx! So there! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Ah, I was assuming that you were triggering sounds per-object (don't know why I thought that). In that case my suggestion would indeed fail.

    If you want to avoid the 'else', you could do this:

    Is NOT visible

    Obj.Count = Obj.PickedCount

    capx:

    https://www.dropbox.com/s/cd141l996flw8 ... .capx?dl=0

  • I would use an array or a global dictionary. Probably a dictionary.

    https://www.scirra.com/manual/140/dictionary

    If you want it to persist, grab it's data AsJSON when it changes, and store it in a webstorage key. Then recall it when the game first starts (you can set a dictionary from JSON).

    https://www.scirra.com/manual/120/webstorage

    Global dictionaries can also be a good alternative to global variables in certain cases. Just FYI.

  • Umm...if you don't want the game to be savable, why are you trying to save the game? <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    To save, the best way is usually webstorage:

    https://www.scirra.com/manual/120/webstorage

    I assume you just want to keep high scores and what-not? Then put it in webstorage.

  • If you are using the 'scroll to' behavior, it has a 'shake screen' action. Here:

    https://www.scirra.com/manual/102/scroll-to

  • Edit: this should be more stable and efficient than the solution you have now.

    Elementry, my dear gmullinix!

    When clicking on a customer, store the customers UID in an instance var of the player.

    On arrival, pick the customer again by using 'pick by UID', and...er...make them happy. <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    Oh, and I added two constraints when clicking on a customer: the event won't run if a path is being calculated, or if the player is moving along a path.

    capx:

    https://www.dropbox.com/s/7a44388ls8j6g ... .capx?dl=0

  • The line-of-sight behavior is probably the best way to go.

    https://www.scirra.com/manual/163/line-of-sight

    If you only have 1 enemy type, or if you are okay with all enemies having the same activation distance, you can put the LOS behavior on the player sprite, and look for enemies in view. This is much more efficient, as LOS can use a lot of resources if it's stuck on too many objects.

    As for spawning bullets, place that as a subevent under the 'can player see enemy' event. You need two conditions:

    For each enemy

    Every X seconds (x being how often you want the bullets to be fired)

    ----Spawn bullet

    ----Set bullet angle toward player

  • There are no path objects in construct. You can 'fake it' by placing objects as 'marks', and moving your followers from marker to marker.

    Using commands like qarp and cubic, you can smooth the movement between points so objects travel along a curve. Unfortunately, it's difficult to visualize this in the editor, which severely limits how practical this approach is in a real game, especially if you have multiple paths.

    One place where it might be practical is for a racing game, as there would only be one path, and you would have a visual representation courtesy of your track itself. You could possibly use the 'car' behavior and simply turn toward a point; the physics built into the behavior should smooth the movement from point to point into a curve.

    Here is a crude implement of my own, made for a different purpose, using the qarp command to control movement between points.

    https://www.dropbox.com/s/cv2gume289gl2 ... .capx?dl=0

    One day, hopefully, we'll get a proper path tool.

  • A cleaner way to do the above would be to place the 'stop sound' action under an inverted 'Is Visible' event. Read about inverted events here:

    https://www.scirra.com/manual/76/conditions

    There may be a better way to handle this, but it would depend on the specifics of the game's design.

  • 1 and 3 would be particularly great. Would make 1 shots a lot more dynamic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's...pretty shady.

    Hope you guys can sort them out.

  • On multi-core's, node-webkit splits into 3 processes. Chrome can do the same thing. I'm not sure which thread does what, but chromium certainly has some multi-threading capabilities.

  • I've seen a lot of people get confused over that (I know I overlooked the difference in the early days...)

    Newt pretty much explained it. Here's one additional bit of info though:

    The way clone works in C2 is a little odd: all your properties are reset to default in the cloned object. This makes certain objects very frustrating to 'clone'. For instance, cloning particle objects means you have to reset ALL the properties, all over again.

    So, if you are wondering why clone isn't working, it's not just you.

TiAm's avatar

TiAm

Member since 24 Nov, 2011

None one is following TiAm yet!

Connect with TiAm

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies