R0J0hound's Recent Forum Activity

  • o you could never have an action that said something like:

    Cat(2).my_instance_variable = Cat(1).my_instance_variable.

    Well, yes you can, what I typed was quite literal, "Sprite(1).X" is an allowed expression:

    http://dl.dropbox.com/u/5426011/examples%208/inst_ex.capx

    A bit more info:

    Sprite(1).X

    will always give the X position of the second instance of sprite, (not the second picked).

    When families get implimented it would look like this:

    Make object "Sprite" part of a family called say "Blue".

    Then with events Blue is just another selection of Sprite, so you can pick two separate instances of Sprite.

    + Start of Layout:

    + Sprite: Pick Instance with UID: 22

    + Blue: Pick Instance with UID: 34

    ---> Sprite: Pin Pin to Blue

  • If there are two Sprite instances their values can be accessed with Sprite(n).

    Ex.

    Text: Set Text to Sprite(0).X + Sprite(1).X

    In the case of your question, it will be simple to do when families are implemented, but at this point you'll have to resort to events instead of using the pin behavior as a workaround.

  • R0J0hound you should really integrate the PasteDelete stuff officially...

    I won't integrate it, because it will only work with the Sprite object if it's effect is set to "none". If the sprite uses any other effect PasteDelete won't work right. It also won't work with TiledBackground or Canvas objects either.

    Just give whatever object you want to delete from the canvas a "destination out" effect before pasting it.

  • It looks like there are two instances, so you need to find the second. Make sure all the layers are visible and have "parallax in editor" for each layer set to no. Then search the layout.

  • There are no instances of that array object on your layout. When there are no instances the expressions default to 0. The only solution at this point is to delete the Direcciones object from the "object types" folder and create a new array on the layout.

    Ashley

    This situation is pretty easy to reproduce.

    1. Create Array.

    2. Delete Array from objects bar.

    At this point Array only exists in the "object types" folder, and there is no way to add an instance of it to the layout.

    Could a solution be to allow dragging Array from the "object types" folder onto the layout if there were no instances of it already there?

  • Store the walls in an array and flood fill the area outside the walls, then any place that isn't filled create a floor sprite.

    I made an example capx but then noticed that this was in the CC section. I'll post it anyway since it doesn't use anything that CC doesn't have.

    http://dl.dropbox.com/u/5426011/examples%208/fill.capx

  • Add an "every tick" event at the end of the event sheet with a "scroll to Camera" action. That removes the major jitter.

  • Just use the "Compare instance variable" condition to pick a certain instance.

    The event will look like this:

    Sprite: testvar=1

  • I was going to say that you would need to use events for that but then I found a solution:

    for i in range(5):
       System.Create("chain", 1, Sprite.X + i*32, Sprite.Y)
       SOL.chainPhysics.DisableCollision("Sprite")
       if i == 0:
          SOL.chainPhysics.HingeToObject("Sprite",0,0)
       else:
          prev_chain.HingeToObject("chain",0,0)
       prev_chain=SOL.chainPhysics[0]

    It attaches the first link to the sprite object.

  • Try

    execfile(System.AppPath + 'Data\py\array.py')

    or

    exec(open(System.AppPath + 'Data\py\array.py'))

    instead.

  • This will work just like zeropad(n,8):

    left("00000000", 8-len(str(n))) & n

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a basic way to do it:

    Every Tick:

    + Sprite: set X to: Sprite.X + 1

    Sprite: is overlapping Wall:

    + Sprite: set X to: Sprite.X - 1

    If the motion is more complex another way to do it would be to save the sprite's x,y position in variables before moving the sprite. Then if it collides with a wall you can undo the motion by setting the sprite's position to the values in the variables.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound