R0J0hound's Recent Forum Activity

  • The first thing that is causing the explosion is creating the chain_link at 0,0 then immediately setting the position. If you condense it into one create action it will fix that. It seems to take a tick for the physics behavior to account for repositioning.

    The second problem that comes up is the links all end up being horizontal in spite of setting the angle. This is the same quirk as with position. A fix would be to make the chain over several ticks.

    * "Start of layout" create the links

    * "tickcount = 0" create joints between links

  • You can't access array expressions in Construct like {"NPCHatelist",str(SOL.Enemy1spawn.UID)} or Sprite.XY from python. You'll have to do a hybrid approach with events and python.

  • Juryiel

    For python you'd have to convert them to a python array:

    pyArray = map(lambda k:Array(k+1), range(Array.SizeX))

    sort it in python:

    pyArray.sort()

    Then put it back in the original array:

    for x,val in pyArray:
       Array.SetAtX(x+1,val)
  • Try this to have a sprite change it's x from 5 to 100 in 6 seconds after a click.

    global variable start_value=5

    global variable end_value=100

    global variable duration=6

    global variable start_time=0

    +On click

    --- set start_time to time

    +time < start_time+duration

    --- Sprite: set x to lerp(start_value, end_value, (time-start_time)/duration)

    +time >= start_time+duration

    +trigger once

    --- Sprite: set x to end_value

  • It can be done in C2 with a layer with "force own texture" and the "destination out" effect for the light glows.

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

    It's quite a bit slower than tulamide's CC version. The main reason is CC can handle a lot more objects before slowing down.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use SOL.Shot.Angle=90. SOL stands for selected object list and when you create an object it becomes the only picked object of that type.

  • 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.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound