LittleStain's Recent Forum Activity

  • There are so many ways to do this, you'd better explain what you'd like to do in a better way..

    It's really a matter of what suits you and what do you like the best..

    Either setting all objects invisible or setting a layer with the objects invisible or creating the objects when needed and destroying them when not..

    Putting the menu on a seperate layer in the layout, or making the layer in a different layout and setting it to global..

    And then some..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem could be the checking of the webstorage value on every collision..

    It is completely unnescessary to do so if you set a variable to the webstorage value..

    And even that seems unnescessary for you are checking the same webstorage every tick and setting a sprite visible accordingly..

    Checking it every tick is also not nescessary..

    Also wondering why you'd use webstorage for this instead of a global variable..

  • The struggle is real ! Do you have any clue how to check it or there is multiple ways to check it?

    To check it you have to compare the variable..

    It's pretty simple..

  • The struggle is real !

    I'm not sure what you mean..

    A big part of learning to program is making mistakes and solving them..

    It's the best way to learn and remember..

    Computers are stupid, you have to tell them exactly what you want..

    If you say:"walk to the table and sit down" to a person, the person will walk to the table, grab a chair and sit down on the chair..

    If you say:"walk to the table and sit down" to a computer, it will sit down..

    if you say:"walk to the table and when you have reached the table sit down"

    The computer will still not grab a chair and sit down on the chair, it will just sit down next to the table..

    If you want it to grab a chair and sit on it, you have to tell it specifically to do that..

    So often you will think you have the right actions/commands, but will find out the computer doesn't understand..

    Solving those situations will make you a better programmer..

  • I guess you would have to know if the player came from Map 2 on start of layout Map 1 or else the player would always start at the exit..

    setting a global variable (or an instance variable on the player) to layoutname before changing layouts and checking it on start of the new layout would do the trick..

  • Select the player sprite and in it's (object type) properties set Global to yes..

    Or........

    On start of layout

    system create object player at x=whatever, y=whatever

    but setting the player to global would be the best choice..

  • Hmm I'm doing something wrong :/

    https://www.upload.ee/files/4795992/MAP ... .capx.html

    That's why I said:

    If the player doesn't exist on map 2, either set it to global, or use a system create player action..

  • - I want the AI to move towards whichever player is nearest.

    - After moving close to the player, I want it to wait if player's busy with other enemy. If not, I want it to attack the player.

    Are there any tutorials on beat em up written for construct 2?

    So which part of that isn't working at the moment?

    you should remove the for each player in the Mode="caughtup" event, for it does nothing usefull and could probably cause issues in the future..

    also the for each player in Mode="following" is useless as is the for each enemy..

  • Could you explain in a better way what you would like?

    What is it that you want the enemies to do and when and when not?

    By answering this question you could already be halfway to solve your issue..

  • on map 1 event sheet add the event

    On collision with layoutchanger

    system goto layout "Map2"

    on map 2 event sheet add the action

    on start of layout

    player set position (add the coordinates)

    If the player doesn't exist on map 2, either set it to global, or use a system create player action..

  • Do you mean?

    Map 2

    on start of layout - player set position

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