LittleStain's Recent Forum Activity

  • To create one row:

    Create a global variable Yspawn

    on button pressed

    system set Yspawn to the Y-coordinate of the first man to be created

    -- system repeat 5 times

    system create man at x= 200 y = Yspawn

    system add 3 to Yspawn

  • Here:

    https://dl.dropboxusercontent.com/u/485 ... roved.capx

    you can now open and close the cupboard with the coat still in it and open and close it after the coat is taken out..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Or add a imagepoint on enemy1 where the origin of enemy2 should be and let enemy1 spawn enemy2 at that imagepoint..

  • As far as I know the expressions in the manual are all the expressions you can use inside your events/actions.

  • Yeah, so you should create the second object relative to the first?

    something like:

    create enemy1 at 200,200

    create enemy2 at enemy1.x+15, enemy1.y-30

  • And what is the problem?

    You can create two different objects in one event..

    for example:

    on left mouse button clicked

    create enemy1 at x=100, y=100

    create enemy2 at x=100, y=100

    You might want to pin them to another sprite and have the movement actions on that sprite first and after a certain amount of time (timer behaviour?) seperate the events for the two different enemies to split them..

  • Yep:

    set angle = angle(bullet.x,bullet.y,player.x,player.y)

  • Something like this should work:

    Give the cupboard a boolean-instance variable CoatTaken.

    add set boolean to yes when taking coat..

    add a subevent to the cupboard rightclick event

    cupboard is not Coattaken- spawn coat

  • Without families using pick nth instance should work also:

    System -> Pick nth Instance

    If 2 instances collide, picking instance 0 will pick the first instance and instance 1 will pick the 2nd instance

    ON collision bouncingBall with bouncingball

    Pick instance 0 ... do whatever

    Pick instance 1 .. do whatever

    if on pick instance 0 you set two variables to CollisionX = bouncingball.x, CollisionY = bouncingball.y

    then on pick instance 1 you can use your code

    System - create object sparkle on layer 1 at abs(CollisionX-bouncingBall.X),abs(CollisionY-bouncingBall.y)

  • While right-clicking on armycoat, you are also rightclicking on the cupboard, so you should add a condition to the first event to prevent it from running when you only want the second event to run..

    adding a is animation cupboardopenempty not playing, should do the trick..

  • So in the properties of all of your four layouts it's already event sheet 1?

    Then everything should be working..

    But if I misunderstood your question :

    If you want each layout to have their own event sheet and include the actions of the event sheet about the objects..

    right click on the event sheet attached to the layout and choose include event sheet..

  • It was well before

    What do you mean by it?

    before what?

    Why was it well?

    Or should I just ask:"What do you mean?"

    I am confused if there another way without attach

    You want the layout to respond to an event sheet without telling the layout which event sheet it has to respond to?

    Is there a way to control a kite without attaching a rope to it?

    Is there a way for a car to pull a caravan without attaching the caravan to the car?

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies