LittleStain's Forum Posts

  • I hope you also understand my explanation for why my event works and your event doesn't..

    It will help a lot when programming with C2..

  • I would do something like this:

    Give the enemy an instance variable WhereToSpawn

    every x seconds

    system create enemy at (0,0)

    enemy set variable WhereToSpawn to choose(1,2)

    system create enemy at (0,0)

    enemy set variable WhereToSpawn to choose(3,4)

    enemy on created

    -- Enemy compare variable WhereToSpawn = 1

    enemy set position: x = random(viewportleft(0),Viewportright(0) y = Viewporttop(0)-100

    -- Enemy compare variable WhereToSpawn = 2

    enemy set position: x = Viewportright(0)+100 y = random(Viewporttop(0),Viewportbottom(0))

    -- Enemy compare variable WhereToSpawn = 1

    enemy set position: x = random(viewportleft(0),Viewportright(0) y = viewportbottom(0)+100

    -- Enemy compare variable WhereToSpawn = 1

    enemy set position: x = Viewportleft(0)-100 y = random(Viewporttop(0),Viewportbottom(0))

  • I'm not sure what you mean by when x = y?

    If you have the variables

    Wouldn't it just be a case of setting the volume inside the play action to the variable?

  • What do you mean by unique, they are all the same sprite, right?

    If you mean you only want to create a block if it isn't overlapping an already existing block, you could try adding an event like:

    block is overlapping block

    Block pick top/bottom instance

    Block destroy

  • If you want certain objects not to move while using physics, you can set immovable to yes in the physics properties..

    If I didn't understand you question correctly, please rephrase..

  • Ok.. beautiful picture..

    Two questions:

    How would you like to control the direction of the ball?

    Have you already looked at the infinite jumper example from the new project dialog?

  • Like blackhornet said, add the Timer-behaviour to one of your objects..

    If you don't know what that is, there is a link to the manual on top of this page..

    In line 19 replace the "asteroid set angle" with asteroid - bullet set angle of motion = Asteroid.direction

    Also in the asteroids properties of the bullet behaviour set the set angle to No

  • The second option doesn't work, because first you are reducing the tiles referenced to tiles that are at 200, 200 and then you are saying these tiles should also be at 100,100..

    It's impossible for tiles to be at two places at once, so the conditions will always be false and the actions will never run..

    what would work (just one example, for there are more ways:

    Tile x = 200

    Tile y = 200

    (subevent)

    -- system pick all tiles

    -- Tile x = 100

    -- Tile y = 100

    System create object Tile

    This way only if there is a tile at 200,200 the subevent will run

    Because subevents normally only pick tiles from the tiles referenced in the events above, the condition "pick all tiles" tells C2 to check all instances..

    If one of all instances is at 100,100 the condition is true and the actions will be executed..

    I would add a system trigger once condition, for else this event will run every tick and endless amounts of tiles will be created..

    There must actually be a much better way to achieve the actions you are trying to perform, but if you want to do it this way, the above explanation should get you there..

  • It would if you told it to.. Haha..

    But Rex has also made a time_away plugin which counts the time since the last session..

    Don't know if he's got the Local storage plugin version working yet, though..

  • I would suggest using the date time plugin..

    It knows the days in a month and the months in a year and the minutes in a day..

  • Make sure you reference the enemy you want to respond to the action in the event..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would create an invisible sprite with the scrollto behavior

    System every tick

    Sprite set position to object player

    Sprite move = 0.25*(distance(player.x,player.y,mouse.x,mouse.y))px at angle = angle(player.x,player.y,mouse.x,mouse.y)

  • Than you should change it to incorporate more types of blocks..

    Right now the array is filled with 0's and 1's, maybe adding 2's and 3's and 4's could be used to add more materials?

    And if diamond is only found in a deep level you might want to add a condition

    "If level is deep add diamonds"

    So only if level is deep ( I guess you know when a level is deep and are able to tell the computer when that is) add the number 5 to the array (assuming number 5 is diamond)

    If this all is a bit too much, you might want to opt for creating the levels yourself inside the tilemap-object and or array..

  • Something like this?