R0J0hound's Forum Posts

  • Like this?

    +sprite: platform is on floor

    +sprite: Is overlapping bouncy at offset (0,5)

    --- sprite: set platform vector y to -500

  • countofquad

    In regard to this Q:

    he reason that I'm concerned is what would happen if Object A's OnCreated code contained a Spawn Sprite statement for SpriteC. Would SpriteC be in the SOL at the point of Line 4?

    SpriteC would not be in the SOL. The "on created" trigger only has the newly created object picked. It does not effect the SOL of the event it was created from.

  • Remove the "wait 5 seconds" and only 5 will be created. With it you get a continuous stream of 5 planes a tick for 5 seconds.

  • The solutions work fine since the objects are created at runtime. Ashley's quote refers to not being able to assume iid or uid of an object in the editor.

    At runtime once an object is created it gets a unique uid that remains the same for the life of that object. IID's at least in this situation are 0 for the oldest increasing in order to the newest. Changing the ZOrder, layer or deleting a mid aged instance (with some older and some newer) at runtime may be cases that might scramble the iid order, but I would have to test those cases to verify.

  • 1. Add a sprite of your pendulum.

    2. In the image editor move the origin to where you want to pivot.

    3. Add the sine behavior to the sprite.

    4. Change "Movement" to "Angle".

    5. Profit

    6. Tweak settings to your liking.

  • The oldest sprite will have the lowest UID and a IID of 0.

    Here is one way to do it:

    +on key pressed
    ---+system compare: Sprite.Count>=2
    ---+System: pick instance 0 of sprite
    ------ sprite: destroy
    ---+every tick
    ------ system:create sprite

    Another way is to give the Sprite an instance variable "age" with an initial value of 0.

    +on key pressed
    --- sprite: add 1 to age
    --- system:create sprite
    
    +sprite: age>=3
    --- destroy sprite
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wastrel

    I like your idea, I was trying to figure out a way to parse sentences and you pointed me in the right direction.

    I used a slightly simplified approach by using pattern sentences:

    eg.

    take 1

    open 1

    unlock 1 with 2

    The sentences the player types needs to match one of those with the numbers replaced with object names, otherwise it will say "i don't understand" or "I don't know what 'foo' is".

    Besides the parsing the game logic is made simple as possible. The command and object names are put into global variables so there are no "tokenat" expressions cluttering it up. The end result is the bare minimum number of conditions to do game logic.

    ex.

    object="key":

    --inventory has "key":

    ----set text to "you already have the key"

    --else

    ----set text to "you take the key"

    ----delete "key" from room_objects

    ----add "key" to inventory

    The room objects and inventory are dictionaries. I didn't implement it but room changing is as simple as changing the room objects. You could add room persistence by storing the AsJSON of the room objects somewhere when leaving the room. A save would consist of the room objects of each room and the inventory asJSON.

    Only about 15 events for the sentence parsing, the rest was for game content (~30 events).

    http://dl.dropbox.com/u/5426011/examples14/text_adventure.capx

  • Use a variable:

    Global number repeat_count=10

    -repeat_count=10

    -every 0.5 Seconds

    -> create Object

    -> subtract 1 from repeat_count

  • Here is the capx: http://dl.dropbox.com/u/5426011/bug/bug_toplevel_event.capx

    It occurs from r100 on and it relates the breaking change with object creation.

    When I create an object at the "start of the layout" and I create another "start of layout" below it I can't pick the object.

    start of layout:
    --- create sprite
    
    //isn't this a toplevel event?  The created object does not rotate.
    start of layout:
    --- rotate sprite 45 degrees

    It may be an issue with triggers because if I replace "start of layout" with "tickcount=0" it works correctly.

    tickcount=0:
    --- create sprite
    
    //The created object is rotated.
    tickcount=0:
    --- rotate sprite 45 degrees

    Also as a secondary issue it seems that groups act as empty events so that there never is a toplevel event in a group.

  • I got it backward, keep the ZElevation and Z distort less than 0 so that the object is mostly contained in it's bounding box. Another approach would be to always position the object at the middle of the screen and use "absolute displacement".

    s there a way to increase the screen size of drawing objects, but not the actual resolution.

    In construct it self, or even in python?

    OR can I edit the bounding box of a sprite, but not there actual height/width?

    No, you can only design around it.

  • Change the "start of layout" conditions in events 1 and 3 to a system compare "tickcount=0".

  • xpressions to retrieve system date and time.

    There's a plugin for that:

    http://www.scirra.com/forum/plugin-system-date-and-time_topic45206.html

    he ability to take a snapshot of a part of the canvas rather than the whole canvas.

    The canvas object can do it with the "paste layer" action if you're not using webgl.

  • Objects are only drawn if their bounding box is on the screen, and the bounding box is always at a ZElevation of zero.

    You ca design your game so that the ZElevation of objects (and distort points) never go lower than 0, just shift them higher. You can also increase the project property "eye distance" if they are getting clipped by being close.

  • Here is a example that uses the canvas object. I made something similar in CC.

    https://www.dropbox.com/s/akiozmfy79ywscq/cut.capx?dl=0

    You will need to re-download the canvas plugin as I added some fixes to make it work.

  • I suppose you could do it with arrays but it's not necessary.

    Here's how I would do it:

    http://dl.dropbox.com/u/5426011/examples14/laserFilter.capx