dop2000's Forum Posts

  • What exactly doesn't work? Multiple sprites are changing color?

    You can do this:

    Mouse On Object MyFamily clicked
    MyFamily pick top instance
    	MyFamily set color....
    
  • Do you need to add "test02" into the array? If you want to ignore it, you can do this:

    Array set value at (loopindex,0) to tokenat(AJAX.lastdata, loopindex, newline&"test02,")

    If you need to put "test02" into the array at index Y=0, and the rest of the string after the comma at index Y=1, do this:

    local variable s=""
    set s to tokenat(AJAX.lastdata, array, newline)
    Array set value at (loopindex,0) to tokenat(s, 0, ",")
    Array set value at (loopindex,1) to tokenat(s, 1, ",")
    
  • Bullet=Yes on the ball should fix it. Check out this file:

    dropbox.com/s/8r3m3yo97z7u13m/PhysicsPinballTest.c3p

    I added "Assets" layout, put all object that you intend to create in runtime there. This way you'll not need to configure their properties with events.

  • You can post an image if you edit your existing comment. It's a bug on the forum.

    Can you share your project file? Issues with Physics are often difficult to troubleshoot remotely.

  • Look at the left top corner in your screenshot. Event sheet for this layout is set to (none).

  • Bar set width to 500*(Player.health/100)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you set Bullet=Yes in Physics properties for both the flipper and the ball?

    Also, how do you move the flipper? You should only do it with Physics actions (apply torque, force, impulse etc.), not by directly changing its angle!

  • If you have access to one of these phones, try getting LogCat log from it. There is a good possibility you'll see the error message in the log.

  • If every enemy should have a pistol, add them to a container. Then the code will be very simple:

    On every tick - Pistol set position to Enemy.imagePointX("gun"),Enemy.imagePointY("gun")

    You won't need "For each" loop, won't need to link them by UID.

  • https://editor.construct.net/#open=template-eat-em-all

    You can copy all events to C2.

  • On Enemy destroyed
    Repeat 10 times
    	Create Cube at (Enemy.x+random(-50,50), Enemy.y+random(-50,50))
    	Cube disable physics collision with Cube
    	Cube set scale to random(0.5, 1.5)
    	Cube apply impulse random(1,2) at angle random(200,340)
    	Cube set angular velocity to random(-300,300)
    	... etc.
    

    Of course, you will need to experiment with all these values and Physics settings (density, damping etc.)

  • My own version of what? What have you tried?

    If you want to try Physics - create a number of cubes in a loop, for each cube set random scale, apply random impulse at random angle, random torque or angular velocity.

  • It's not really a loop. You just need to increment the LEVEL variable when some conditions are met (all coins collected, all enemies killed). And then you can start a new level, creating a number of new coins/enemies, which is based on the LEVEL value.

    So your code may look something like this:

    On start of layout
    	Repeat (LEVEL) times	: Create Enemy
    	Repeat (LEVEL*2) times	: Create Coin
    
    
    On Enemy destroyed
    if Enemy.count=1 // last enemy killed
    	Wait 1 second
    	Add 1 to LEVEL
    	Restart layout
    	
    
  • Another option is to add RoomInside object to a family. Then you will be able to pick two separate instances in the same event.

    Pick RoomInside instance N
    	Pick FamilyRoomInside instance (RoomInside.IID+1)
    	...........
    
  • You can style TextInput with CSS - use "Set CSS style" action.

    Another option is to make your own text input using text or sprite font, then you will be able to use bbcode.