oosyrag's Forum Posts

  • tokenat()

    https://www.scirra.com/manual/126/system-expressions

    Use nested tokens, first one would be for polygon, second one would be for points, third one for commas.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I highly doubt this is possible with C2, but I could be wrong.

  • Hmm not sure, hard to visualize. Sorry I was pretty tired when I wrote that, maybe it doesn't work.

    The idea is to take the difference between the area's total width or height, and where the first object spawned.

    Imagine 0 to 10 on a line, where 10 is your total width.

    Opposites would be 1 and 9, 4 and 6 ect. So if my object spawned at 1, 10-1=9. 10-4=6.

    If you do this for both the X and Y you should get the other side of a square. I think.

  • Keep your points and lives information in a global variable or array.

  • You'll have to do some pretty advanced coding for that, but it is possible in my mind. I've thought of a similar system but have never actually created it.

    Rough idea -

    Create an array representing the width and height of your layout: more cells = higher resolution.

    As you swipe, record where your swipe passed through by toggling values in the array.

    Compare the array data with your accepted patterns to do actions <- This is the hard part.

    You'll have to have a certain leeway for your comparisons - after all, everyone draws a different shaped/sized circle. Also they might start in different places, or even put their circle in different places on the screen.

    To fudge it a bit I would actually check for a more specific pattern in the array, but have the user input cover more cells, and as long as the pattern is found anywhere in the array the action would fire.

    A second method would involve recording the maximum values your swipe coordinates reach and when they reach them - basically record corners/vertices in your drawing, and compare the locations of those with each other to match patterns. This is how swype-style text input on smartphone keyboards work.

    Either way is a pretty large task to undertake.

  • https://www.dropbox.com/s/z7fc5hey0yzu5 ... c.zip?dl=0

    .capx located in the same folder as nw.exe. Use nw.exe to run exported project.

    Again, if you preview from capx using nw.js, you need to copy your file to the nw.js folder.

    The issue I found was textbox is not captured by snapshot, so I used a spritefont instead.

    There is no confirmation that the download happens in nw.js - check your default chrome save directory.

  • Did you test by exporting or previewing? Make sure the file name/path matches exactly, if you used the debug method I recommended.

    This won't work from preview from browser (chrome or other), you have to set the preview to nw.js in project setting.

    If you do that you'll see that for preview the file needs to be where you have nwjs installed. Can you confirm your file is there and not the construct folder? (When you export, you'll need to copy it to the export directory)

    I'll put together a package capx/exported project for you, but I ran into another issue where textboxes are not captured by the snapshot feature so I'll post it once I put together a workaround for that.

  • As far as I know, sprites are only loaded in the layouts they are present in, so that shouldn't be your problem.

    To make your game have less lag, you'll need to pinpoint exactly what is causing the lag.

    The first thing that I would suspect is your ragdoll physics - this can take tons of processing power, especially if you have too many objects requiring physics calculations.

  • Won't know unless we see it.

  • Not firing in unison, use for each enemy condition.

    Edit: Looks great btw!

  • Well depending on how you show your text, you could add a simple sprite: set frame action to whatever triggered the text to show - that would be much simpler!

  • I would treat the spawn area as 4 spawn rectangles. First ceil(random(4)) to pick which rectangle the first object spawns on, then create it (assuming origin point of the spawn rectangle is top left) at spawnrectangle.x+random(spawnrectangle. Width), spawnrectangle.y-random(spawnrectangle.Height)

    For the other object, use layout.Width-object1.x and layout.height-object1.y to get the opposite location. (Or whatever width and height the total black area is, if your layout is bigger.)

    This is slightly less than true random, because the corners will overlap and you have a higher chance of spawning there overall compared to the sides.

  • From the manual:

    [quote:3aq2zl13]Wait

    Wait a number of seconds before continuing on to the next action or sub-events. Other events continue to run in the meantime. See also the tutorial on How to use the System 'Wait' actions.

    https://www.scirra.com/tutorials/56/how ... ait-action

  • Use the random() expression.

    On SpawnCondition - Set RandomVariable to random(100)
    
    If 0<RandomVariable<30 - Create 30%chanceLootSprite at InvisibleSprite.X+random(-InvisibleSprite.width/2,InvisibleSprite.width/2),InvisibleSprite.Y+random(-InvisibleSprite.Height/2,InvisibleSprite.Height/2)
    
    If 30<RandomVariable<100 - Create 70%chanceLootSprite at InvisibleSprite.X+random(-InvisibleSprite.width/2,InvisibleSprite.width/2),InvisibleSprite.Y+random(-InvisibleSprite.Height/2,InvisibleSprite.Height/2)[/code:1x62l5ug]
    
    Repeat for however much loot you want to create.
  • So... what is your problem?