R0J0hound's Recent Forum Activity

  • Usually a family is needed to do that. Look here for an example:

  • If you have the text in a var you can remove the " with:

    set var to replace(var, """", "")

  • pick by uid can pick the new objects at any time. It is the exception to the rule.

    Functions and "on created" are run as if they were placed where the object was created or where the function was called. So no, they are not top level. For example:

    this:

    +-------------------+
    | on function "move"| sprite: set x to self.x+32
    +-------------------+
    +-------------------+
    | on sprite created | sprite: set opacity to 50
    | pick all sprite   |
    +-------------------+
    +-------------------+
    | start of layout   | create sprite at (0,0)
    |                   | call function "move"
    +-------------------+[/code:rahmbimr] is the same as this:
    [code:rahmbimr]+----------------------+
    | start of layout      | create sprite at (0,0)
    +----------------------+
       +-------------------+
       | pick all sprite   | sprite: set opacity to 50
       |                   | sprite: set x to self.x+32
       +-------------------+[/code:rahmbimr]
    
    For the case of needing to do something to all the instances right after a new instance is created I usually use a   variable or a group that i set or enable when i need to do something.
    
    global number zsort=0
    
    sprite: on created
    --- set zsort to 1
    
    start of layout
    --- create sprite at (10,10)
    
    zsort=1
    --- sprite: sort
    --- set zsort to 0
  • Have you tried re-uploading the images?

    when i go to the image url with the browser the image doesn't show.

    http://snya.comxa.com/test4/images/sprite-sheet0.png

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The main issue is sprites can't be skewed. So without third party plugins the best you can do is fez like rotations:

    Of course you may be able to do an isometric view with lots of animations of the the cube rotating.

    Alternatively you can skew images with the paster plugin. You can look here:

  • It's not really a bug, it's just doing it how the javascript % does it. Also apparently there isn't a consensus in the computer world what % should exactly do when one of the values is negative. See here, the sign of the result varies depending on the language:

    https://en.wikipedia.org/wiki/Modulo_operation

    For an always positive remainder you could do one of these:

    (a%b+b)%b

    a-int(a/b)*b

  • A quick way would be to use a variable like this:

    global variable once=0
    
    on collision
    once=0
    --- set once to 1
    --- do stuff
    
    every tick
    --- set once to 0[/code:239878ee]
    
    That way you'd only get one event per tick on that object type.  Actually you'd want an instance variable instead to have one collision per instance per tick.  Or if you wanted only one trigger per pair of instances you could use a dictionary to keep track of it like:
    
    [code:239878ee]on collision
    X dictionary: key exists min(sprite.uid, sprite.chipmunk.otherUID)&":"&max(sprite.uid, sprite.chipmunk.otherUID)
    --- dictionary: add key min(sprite.uid, sprite.chipmunk.otherUID)&":"&max(sprite.uid, sprite.chipmunk.otherUID)
    --- do stuff
    
    every tick
    --- dictionary: clear[/code:239878ee]
    
    I do not know if the chipmunk library has anything to help with that.
  • https://dl.dropboxusercontent.com/u/542 ... rsect.capx

    dist = distance between centers

    ang = angle from one center to the other

    Then from the first center you move r0 pixels at angle ang+acos((r0^2 -r1^2 +dist^2)/(2*dist*r0)) to get to the left intersection point. You can also use -acos to get the right intersection point.

  • That doesn't make sense. What in particular are you looking to solve with that diagram?

    Is P0 the player and P1 the enemy and you want to find p3?

  • lolpaca

    Look here for a visual of what they are. You can ignore the math.

    https://en.wikipedia.org/wiki/B%C3%A9zier_curve

    The curves made of 3 points are the "quadratic curves" and 4 points are the "bezier curves".

    The first and last points are the end points and the points in between are control points.

  • If the pixelate effect is getting broken on export then, yes report just that. Don't include the outline effect in the report, since third party stuff can't be in bug reports. If it gets fixed then the outline effect will likely be fixed as well.

  • Oh wait, I had the logic reversed. You want it to loop as long as either of the variables is 0, and my example only stops when one of them is zero. Add an "else" to fix it.

    +--------------+
    | while        |
    +--------------+
       +-----------+
       | trueA = 0 | set trueA to 1
       |   -or-    | set trueB to 1
       | trueB = 0 |
       +-----------+
       +-----------+
       | else      | stop loop
       +-----------+[/code:2lvl4d64]