R0J0hound's Recent Forum Activity

  • With events the picking is reset between toplevel events. The picking doesn't seem to be reset when creating objects in python. Fix it by adding a "For each MouseKeyboard" condition so that the picking gets reset. You can replace MouseKeyboard with any single instance object, the point is For Each resets the picking.

    + System: For each MouseKeyboard

    + MouseKeyboard: Right mouse button is down

    System.Create("Shot", 1, System.MouseX, System.MouseY )
    SOL.Shot.AngleTowardsPosition(640/2, 480/2)
  • Some keyboards can only handle so many keys pressed at once. You might be able to handle more keys pressed at once if you use a different key combination.

    I had a keyboard that had the very issue you describe, and it happened in any computer game that I ran.

  • Just use MouseX and MouseY they are System expressions.

  • First result for a search for worms:

    http://www.scirra.com/forum/how-do-i-simple-worms-game_topic47872_post300449.html#300449

    It uses a math generated landscape, but a background image is also doable.

  • he issue is that if I move a Player with ClassID=2 into LOS of a NonPlayer, it still acts as if I moved the Player with ClassID=1 into LOS (The toggled off Debug Text also reports 1 for ClassID when I turn it on), as if picking isn't working with the For Each. Why is that?

    I have a hunch it might be a bug that hasn't been squashed and comes up from time to time. It has to do with the wrong private variable being set when done from a family.

    Do this test:

    All you need in the layout are the objects in the player family and an event sheet with just this event:

    + System: Always (every tick)

    -> Players: Set 'ClassID' to 1942

    Run in debug mode and see if ClassID is 1942 for the objects. If some other variable is 1942 instead of ClassID then it's that bug.

    Either way pm the cap or post it here and I'll take a look.

  • You could use the bullet behavior:

    +PlayerSword collides with Enemy:

    ---Enemy:Bullet:Set speed: 400

    ---Enemy:Bullet:Set angle of motion: angle(player.X,player.Y,self.X,self.Y)

    ---wait 1/4 seconds

    ---Enemy:Bullet:Set speed: 0

    If the enemies move with some other behavior then stop it's motion, disable it, move with the bullet behavior then re-enable the it after the wait.

    You could also use events or Custom movement like yuquanzhou007 suggested, whichever method you prefer.

  • Jase00

    First you need to not move with the keyboard movement:

    + System: Start of layout

    -> Sprite: Start ignoring user input

    Second to make the sprite move on it's own you need to use the "set x component of motion" action of the platform behavior. Use positive values to move the enemy right, negative to move left.

  • Here is an example:

    http://dl.dropbox.com/u/5426011/examples12/jump.capx

    2. Future positions are calculated in a loop in much the same way as the platform behavior actually moves.

    3. Basically like kittiewan said.

  • tulamide I haven't used function alias' before so I did some tests and looked at the source to see what it does.

    Isolated/inline act the same as calling a function with forget/remember picking. Any picking done by the alias is forgotten when the alias returns (I initially thought that "inline" would change the SOL of the event that called the alias, but it's not the case).

    Example of use:

    + Function: On Alias "isValue"

    -> Sprite: Rotate 45 degrees clockwise

    //// all the sprites are rotated

    + Sprite: Pick one at random

    + Function: "isValue" (Isolated)

    ////only one is rotated

    + Sprite: Pick one at random

    + Function: "isValue" (Inline)

    Shindoh

    Here is another method using two conditions.

    + Sprite: Value 'test' Equal to 0

    + System: CountMatching(Sprite.OID) Equal to Sprite.Count

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make the layout size large so you have more space then re-size the layout back to what it was when you're done editing. This will only allow you to work further right and down. There is no solution for working further up or left.

  • chrisbrobs

    It's much simpler than what the converter spits out.

    http://dl.dropbox.com/u/5426011/examples12/canvas_rounded_box.capx