ramones's Forum Posts

  • Turn off default controls in the platform properties, add the keyboard object and then make events for each key:

    keyboard: left arrow is down -> platform: simulate pressing left

    keyboard: right arrow is down -> platform: simulate pressing right

    keyboard: on z pressed -> platform: simulate pressing jump

  • The solid behavior interacts with Platform, 8Direction, Car and Bullet (when bounce off solids is enabled). Two solid objects won't interact with each other otherwise you couldn't have overlapping walls, floor etc. I assume that's what your problem is - that you have the shield and enemy set to solid and think the shield shouldn't overlap the enemy? You'd want to give the enemy 8Direction behavior and remove Solid. Or if that's not the problem, what do you mean when you say it won't work?

  • To get the touch coordinates on layer 0 use Touch.X(0), Touch.Y(0) or Touch.X("Layer 0"), Touch.Y("Layer 0").

  • Because your for loop is running every tick. You should set it to run on start of layout or some other condition so it's not continuously spawning shield sprites.

  • I've had this problem since I started using C2 (r87 or so). I've tried it on another computer and had no problem so I figured it was got to do with my setup/ graphics card or something. I just learned not to click there.

    It happens in layout view if I have more than one object selected and I click in the white area below properties or on the grey margin to the left of the properties. It doesn't crash if I've only a single object selected and I click there.

    Win 7 64-bit

    ATI Radeon HD 5750

  • There's no zombie sprite. It's just the way else works.

    lse :- Run if the previous event did not run. Note that this condition does not pick any objects: if it follows an event that picks objects, in the Else event all instances revert to picked again.

    If event 2 doesn't run (there are no Sprite2 instances with death = "none") then event 3 will run. Sprite2.UID just returns 0 because there are no Sprite2s.

  • Yeah you could have the object picking loop in it's own 'on start of layout' event. Putting 'trigger once while true' on it's own is basically the same as 'on start of layout' I think.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah it uses the value of the variable when the action actually runs, not the value it was when you called the 'wait' action. Like in your fixed example with the global - if you changed that global variable in another event before the wait time was up, it would screw it up.

  • You can only use loopindex when you're inside a loop. After the wait, when the create object action runs, it's looking for loopindex which doesn't exist because the loop has finished.

  • +System: Compare two values [score % 10 = 0]

    +System: Trigger once

       -> System: Add 1 to level

  • Link to .capx file (required!):

    changeLayoutOnDestroy.capx

    Steps to reproduce:

    1. Press SPACE a few times to switch between layout 1 and 2.

    Observed result:

    Switching layout destroys all sprites on the layout 1, which calls their 'on destroyed' event, which then spawns new objects on layout 2.

    Expected result:

    Layout 2 should be empty, layout 1 should only have 4 visible sprites.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack: Win 7 Home Premium x64 - SP 1

    Construct 2 version: r116

  • Did you give the walls solid behavior and set the planet to bounce off solids?

  • Here try this. It creates an object for each value your php script outputs.

    createObject.capx

  • The problem is that "Ball: Spawn Ball" doesn't pick the new ball (it did used to work that way) so the following lines (set gravity and speed) apply to the existing ball and not the newly created one.

    Change that line to "System: Create Ball at Ball.X, Ball.Y".