Miyavi's Recent Forum Activity

  • Okay, nevermind, I already solved it.

    I have a player variable, which tells me if I'm on earth or in water.

    I set the enemies to chase me just when I'm on earth.

  • Hi guys,

    the problem is the following:

    My main character moves around the map, and when enemies are closer to him, they chase him, however I want to have a sort of "safe zone", in my case, a river in my map.

    Is there anyway I could to to prevent them from coming into that zone, so they stop just in front of it?

    It would be like a solid, which is only solid for some objects, so they collide, and can't move through it.

    I've tried to create a sprite, and when an enemy collides with this sprite, they stop following me, but then, when I'm out of my safe zone, they won't chase me any more.

  • The .capx I posted isn't my actual game develpoment footage.

    It's just a quick example of what I'm trying to achieve.

    In my actual content, there are several layers (5 if I recall correctly), being #4 the one related to the pause screen.

    In this .capx, it happens just the same as in my actual content: It will pop up, but it won't pop out.

    Some enlightment on the subject will be much appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So.. I still haven't been able to solve this.

    Here's a simplified .capx of what I'm trying to do.

    As you see, the orange screen (my pause screen) pops up when I first press ESC, but it won't pop out when I press ESC again.

  • Hum... got it done like this,

    It pauses the game when I press ESC, and the pause screen comes up, but if I press ESC again, the timer would go on, but the pause screen stays.

  • Miyavi

    Might try to use pause plugin.

    I'm using it for pausing the game actually.

    Put the test on juegoPausado in subevents of the "On key pressed" event.

    And for your second test, just put a "Else"

    On ESC key pressed

    ... If JuegoPausado = 1

    ...... Do stuff;

    ... Else

    ...... Do other stuff;

    That's what I needed, I am actually using r84, so I wasn't aware of these new improvements yet.

  • Hi, would anyone be able to tell me why this isn't working?

    If for the first statement, instead of "press", I set it to "release", It will bring up my pause screen and will be doing correctly when releasing ESC, but I'm having problems to make the same pause screen disappear pressing ESC again.

    Hum, don't know why you can't see the image.

    Here you go http://imgur.com/0nKQ2

  • Hum... I don't know why, but when I try to set an object instance into the layout (Ex:Archer into Level1 Layout), it doesn't appear when I run the game.

    I think I actually deleted the Archer object from my folder, and the replaced it, don't know how.

    All its actions remain there, and it's instantiated well, so I don't know what's happening.

    EDIT:

    Nevermind. Its variables got edited to 0 when it was deleted.

    I guess that's the problem :)

  • Yeah, that's what I was talking about. This thread is from Oct 2011, so I was just making sure, as I was having some issues.

  • Does the actual "Duplicate" option, when you right click a layout override this "hack"?

  • So after struggling with it, I think I found a solution for both problems.

    For the level selection one, I've done it with global variables, and it seems it works correclty now.

    For the total score update, it seems something was going on with my timer, as when I tried to set the score as : totalScore = playerScore + (timeLeft*2);, the "timeLeft*2" seemed to be the one that was giving me the problem.

  • Hi guys,

    I'm having some problems here.

    I have a level selector, let's like it's Angry Birds-like (you can't play level 2 unless you have completed level 1), and I'm having some problems here...

    I don't know if I'm doing it correctly or not, but this is the way that came to me.

    In my level selection layout, I have two sprite-buttons, one of the is level one, the other is level two.

    You can play level one (green colour), but level two is disabled (gray).

    I've tried to do it in two ways:

    Having an active variable for each button, so I enable it when it's true.

    Having an external object, which stores local variables, basically the same.

    So, I also have a level one layout, level one eventsheet, and level one HUD eventsheet. The relevant one here is the HUD sheet. There, I count how many enemies are in the level, and if I destroy them, this number decreases, so when it reaches 0, the level ends (level completed).

    When the level ends, I make a recount of the points earned for destroying enemies, and I switch the level 2 active variable from my level selection layout to enabled.

    What happens is that I guess it doesn't really enable it, as my level 2 doesn't turn green as it should.

    Also, my global var "total score" (points which will be used in an in-game shop), goes crazy when I try to add my level earned points to it, as it seems it doesn't stop adding them, and my total score var goes on increasing.

    Could anyone help me with these matters?

    Thanks in advanced, and sorry for the long post.

Miyavi's avatar

Miyavi

Member since 17 Apr, 2012

None one is following Miyavi yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies