dryas's Forum Posts

  • I've found something using the "distance" expression:

    scirra.com/forum/how-do-i-get-all-objects-in-a-radius_topic48595_post305201.html

    My current object is called "bomb" and I want all "bombs" in a specific radius to also explode... how can I do it with the engine?

    "for each objectThatyouwantTopick

    -distance(pointofexplosion.x,pointofexplosion.y, objectThatyouwantTopick.x, objectThatyouwantTopick.y) < radius, do stuff"

    Means:

    for each bomb

    -distance(bomb.x,bomb.y,bomb[from foreach].x, bomb[from foreach].y) < radius

    How can I seperate between the items of the foreach and the bomb item that has exploded?

    Best,

    Benny

  • Hello,

    I've faced another problem. I have a playing field inside my game which is based on tiles (I've used the "Jump&Run" Tutorial as a base for it). On this field there are some bombs which can detonate if the player fire them. If there are bombs on the neighbor field they should also explode. There are different kind of bombs with a different "explosion" radius in that other bombs should also explode...

    Any idea how I can implement this feature? I've tried to check if another bomb is inside the explosion radius but it didn't work. I've also tried to give all bombs an instance variable (x,y) and check if another bomb is on a neighbor field, but this looks to be "not right"... :-(

    Best,

    Benny

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot, this works like a charm! :-)

  • Hi,

    I'm new to construct2 and I wonder how I can remove a tile the player has passed.

    To get it clearer. I have a top down game where the player can move on a platform. There are a few tiles on this Platform that will break once the player has moved over them. So I need to set a special status of the tile (Instance vars?) if its breakeable or not and need to find out on which tile the player has moved (the tile should break AFTER the player has moved over it. So I need to play the "break" animation and after that I need to destroy it. How can I do that?!

    Best,

    Benny