vee41's Recent Forum Activity

  • On start of layout

    Timer 'create ball'

    .. start Timer 'once, random(1,5)'

    On timer finished 'create ball'

    .. create object ball at (X= choose(0, windowWidth), y= random(0,windowHeigth)

    .. ball set angleOfMotion to scrollX, scrollY

    .. start Timer create Ball 'once, random(1,5)'

    This might work, or at least give you an idea how to do it. It will only spawn balls to the left or right side of the screen, if you want them to spawn at top and bottom too it's the same method with one extra condition added.

    So you'll need to have timer behavior on your level (on some invisible object or something like that) and the ball object needs bullet behavior. Every time the timer finishes, a ball will be spawned at the edge and it's Y coordinate will be randomed along the edge. Then we set the motion towards center of the screen (which is the scrollX, scrollY expression).

  • The .capx I posted works for me, when you click on button it changes the frame to 1 while sound is playing. Sprites frame changes to 0 when it is not playing a sound effect. You can have as many buttons/sounds as you need. Wasn't that the goal or did I miss something? :)

    Edit: As always, don't bother running anything HTML5 related in Internet Explorer as it won't work as intended.

  • My bad, I stand corrected. :)

    Here is fixed version: animation frame change when sound ends

    Not the prettiest of solutions but works.

  • Your solution is good for one button, but what, when each button will have other sound, and they are pressed on the same time?

    The events should work with any number of buttons/sounds. I'd place different buttons as different animations to that single object.

  • If its tilebased, I'd start flooding every non-walled tile starting from the castle and see if flooding makes it to the edge of screen. Basically check if any tiles surrounding flooded tiles are not flooded and flood them. Walls would block flooding. Could be optimized but that might not be necessary :)

  • If it

  • Link to .capx file (required!): capx

    Steps to reproduce:

    1. Run the layout

    2. Disable the add obstacle event and run layout again

    Observed result:

    Both objects move the same way around the obstacle, while only one of them has obstacle added.

    Expected result:

    The other object should go through the obstacle. This is fixed when objects have separate cell sizes.

    Manual quote :     "For best efficiency, use the same cell size and border for all objects using the Pathfinding behavior in a layout. If different objects use different values, then the Pathfinding behavior must generate multiple obstacle grids in memory, and pathfind along them separately."

    Changing cell size is poor mans fix to have them generate separate obstacle maps, but as mentioned in the manual this can have performance implications.

    Browsers affected:

    Chrome: yes

    Operating system & service pack:

    Win 7

    Construct 2 version:

    r148

  • Here is what I was talking about: dl.dropboxusercontent.com/u/19921470/testmyfile.capx

  • Because IID's are just indexes of objects. Manual explains it better. :)

    I'd recommend you use UID's and use the 'pick by uid' condition instead of referring to IID's in expressions. Referring to things in expressions is coderish way of doing things and not necessary in C2 :)

  • Put your UI elements in separate layer that has parallax scrolling set to 0,0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One way to do it would be this:

    variable lastTouched

    On object clicked

    .. set lastTouched : object.UID

    On button clicked

    pick object by UID lastTouched

    .. object destroy

    So every time you click on object you save the objects UID to a variable. When a button is pressed, we pick the object indicated in variable and destroy it.

  • You can pick things separately in sub event, your higher level picked objects will stay intact. Do something like this:

    variable: count

    .. complex stuff picking here

    .... pick all stuff

    .... pick stuff you want to count

    .... set count as stuff.pickedcount

    .. do things with before mentioned complex picked stuff

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies