lennaert's Forum Posts

  • You could try and add instance variables to the walker, so the set animation doesnt get set every loop.

    like, add instance boolean variables: walking = true, and attacking = false

    set them accordingly, like, in the first sub, once its walking, set the variable walking to true.

    to the distance check, add a check for the boolean is walking, and invert it.

    Now, when its bigger then 200, and boolean is walking = false, it will set the animation to walking and the boolean to true.

    Do the same principal for the attacking.

    In short: by means of boolean sets and checks, prevent the spriter animation from being set every loop.

  • wouldn't

    on collision with block

    and

    random(100)<25

    be better ?

    performance wise the choose is a lot lighter.

    Random also does decimals >_>

  • Here's some thoughts:

    Zoom

    when pressing the curent print button, have it zoom in on the card a bit first, and make everything around it white. (move to a higher layer with a white background) This way when the print option pops up to print the whole page, you only see the card.

    Snapshot

    I havent toyed with the snapshot before, but perhaps you can use the canvas snapshot to make an image of the card and have it used from there. Like, offer as a download, so the user can download it, and then print/whatever.

  • first manually drew a selection on your first image , with the desired white colors, trying to stay as much within the black outlines as possible, and copied that to sepeprate transparent image.

    (was bit of haste job, henche the missing pixels lol)

    This gave me the ferret with inner colors of your desired final result.

    I think I then did the same fidasx did (masked original image with white background to remove white background), but then copy pasted the first image I made over that, keeping it within the black lines, retaining all the nice shadow effects from the masked image.

    2 minutes

    Its a bit of a bastards approach :) but worked smooth

  • I've tested some c2 apps in chrome for pi on raspbian few months ago, it didn't do well. Back then, there was no webgl support so it was a showstopper.

    I have no idea what's current status on webgl support in chrome for pi. Also, i spent only hour or two setting up pi, so maybe my settings were wrong.

    Maybe somebody did tests on more recent chrome?

    if anybody wants me to run some C2 tests on pi, i have one in the office :)

    I love the Pi :D I have one with a webinterface running a climate controle and sprinkler system with a camera monitor, wifid :D

    Awesome stuff...

    but tying to desktop it .. yikes ...

    It will eat half the memory ...

    Then with roughly 256mb left, and a browser to start ... I can imagine you can only run small apps on it without lagg/performance annoyances.

    I think you can compare this to like having 3d options in construct 2 xD

  • the index nmbr is the nth touch

    like

    0 = first touch

    1 = second

    etc

  • yes, the first sub of the for each should be the distance check, if the distance check doesnt pass, it shold use the actions of the else (the actions that came from the second loop)

  • what behaviour are you using for the ball ?

    If you are using bullet, you can increase max speed on every desired collision.

    event: ball on collision with player

    action: set ball bullet speed to bullet speed + 0.01 (or whatever)

    you can manipulate the behaviours speed and acceleration this way easily.

  • add event, system event ... I generally then just type the name else, and the selection narrows down to it xD

  • Manual entry

    AngleAt(index)

    AngleForID(id)

    Get the angle of motion of a specific touch in degrees by its zero-based index or unique ID. A touch must be moving across the device screen for this expression to contain a useful value.

    You can also get the angle of your swipe with Touch.AngleAt()

  • would setting for each walker as topevent above the every x seconds and removing it in the subevents work?

    nah then it would only fire once.

  • It's directly in the set angle of motion to angle(Walker.x,Walker.y,Psi.x,Psi.y) part. I wonder why that's causing so much lag.

    Put that action in the action directly after the for each loop in what I mentioned above. Will prolly solve it :)

    event:

    condition: for each

          action: set angle

    sub 1: distance check

          actions: etc

    sub 2: else

          actions: etc

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How many active walkers do you have on one layout ?

    You are firing 2 foreach loops for them every 0.05 seconds.

    you could start by adding 2 sub events to the first for each loop, and move the distance check to the first sub. In the second sub add an else and add the actions from the second loop.

    This way you can delete one of the foreach loops with its checks, which should now get handled by the first loop "else" statement.

    event:

    condition: for each

    sub 1: distance check

          actions: etc

    sub 2: else

          actions: etc

  • <img src="https://dl.dropboxusercontent.com/u/7134196/ferret.png" border="0" />

  • take a look in the manual for find()

    something like   find(varwithtext, "stringtolookfor")

    if stringtolookfor does not occur in varwithtext, it should get you a -1

    For every occurence, it will add 1 to the result.

    I think this is the implementation of javascripts IndexOf

    variable = "long text with some stuff"

    find(variable, "stuff")

    should give you 0

    variable = "long stuffed text with some stuff"

    find(variable, "stuff")

    should give you 1