R0J0hound's Recent Forum Activity

  • Here is a way to check to see if a sprite is occluded by using only collisions.

    http://dl.dropbox.com/u/5426011/examples12/lensflare.cap

    • The flare has a point collision and is used to check every pixel of the det sprite to see if it's visible using ZIndex and collision.
    • The Sprite events can be replaced by a family to handle more objects.
  • Try changing the z order of the canvas. If you use "Before Drawing" you should get everything that is under that canvas.

  • Exe files are compiled, you cannot easily edit them. Why not just do the changes in your cap file and re-export a new exe?

  • Containers are easily implemented with events.

    Say you want a container with 2 objects: Sprite* and Sprite2

    * Sprite will be the primary object of the container. If you want to destroy or create the container destroy/create Sprite.

    //first all container objects are created for each Sprite

    +On start of layout

    --- Sprite2: destroy

    --- Sprite: spawn Sprite2

    //creating a container

    +Sprite: on created

    --- Sprite: spawn Sprite2

    //destroying a container

    +Sprite: on destroyed

    +System: pick Sprite2 instance Sprite.IID

    --- Sprite2: destroy

    //Then for simple container picking

    +every tick

    --- Sprite2: set position to Sprite

    //Or when you want to pick the contained objects after some other picking has been done:

    +for each Sprite

    +System: pick Sprite2 instance Sprite.IID

    --- Sprite2: set position to Sprite

  • I think it's just an animation. You can make one in most 3d programs with a cube viewed with orthographic projection.

  • You could use a layer effect, but you'd have to write the shader since one for those effects don't exist AFAIK.

    Or you could use a canvas object as it also has distort maps. You could then use paste action to draw the objects into the canvas, or perhaps the grab layout property.

  • You can create the shadows with events. For the method I gave you just make sure that the number of shadows matches the number of patrol. If the number is less create another, and if it's more delete one.

    Another method would be to use an instance variable in the patrol to keep track of the UID of it's shadow.

    You can make them move out of sync with a Boolean instance variable and the wait action:

    +patrol: is NOT patrolling

    +for each patrol

    --- patrol: set patrolling to true

    --- wait random(2,4) seconds

    --- patrol: set angle of motion...

    --- patrol: set speed...

    --- wait 1 second

    --- patrol: stop

    --- patrol: set patrolling to false

    Of course you could alternatively use a variable to make a timer.

  • 1. The system compare condition does no picking so place events 2-5 as sub-events of a "for each Patrol".

    2. Duplicate the shadow object in the layout so you have 3 instances. Replace event 6 with:

    +Every Tick

    --- Shadow: set position to Patrol

  • You could use sprite distort maps:

    http://dl.dropbox.com/u/5426011/examples12/twist_pinch.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

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