Miyavi's Forum Posts

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Okay, I'm having a problem.

    I've been doing the chasing system this way:

    if (player.x - spearman.x) > 0 --> spearman.x += 1; set mirrored.

    if (player.x - spearman.x) <= 0 --> spearman.x -= 1; set not mirrored.

    Same thing done with Y coord, as I'm doing an isometric game.

    This way, it compared positions, and the enemy sprite turns accordingly towards my character.

    Of course, doing the "set speed 0" thing won't work, as the enemy will still be moving by coordinates.

    I guess I have to do something like this:

    if (player.x - spearman.x) && (Distance(player.x,player.y,spearman.x, spearman.y) >= 30) > 0 --> spearman.x += 1; set mirrored.

    This way, it will only come to me when it's further than 30px from me, I guess.

    However, I can't manage to get the syntax correctly. >.<

    EDIT: Nevermind. Think I got it working :D

  • There is probably a lot of different methods, heres two I use though.

    First you use an invisible sprite that is bigger than your player sprite and then set its position to your player. Then you give your enemies commands that once they are "overlapping" the sprite that their speed will be reduced to 0, stopping them.

    Another way is with the distance checks. For example your condition could be; Distance(player.x, player.y, monster.x, monster.y < your desired distance you want them to stop. And then the action could be again to set the speed to 0.

    Just remember if you want them to start running again once you move away - then you need to tell them what to do as well. IE, invert the condition and set the speed to their regular speed again.

    Thanks a lot,

    I'm going to give it a try.

    Indeed I was trying to do it comparing distances, but I guess I had it done wrong.

  • Hi again, guys.

    I've been making some progresses with my game, but I'm having some problems as well.

    For example, I have some errors when I try that my enemies chase me and attack within range (as for spearman). They sometimes bug, and won't chase me at all, sometimes they will just stop (and when my action area gets off them, and then I come closer to them, they will reactivate, and so on..)

    So.. would any helping hand suggest some improvements?

    PS: I actually ran out of events, so I'm buying the standard version tomorrow :D

    Sorry it's uncommented and such, but It's a bad habit I have >.<

    If you have any problems with it, just ask me.

    Capx here

  • Hi, I have a player solid object, and some solid enemies objects.

    These enemies, whenever I am close to them, they start start to chase me.

    The thing is that if I quiet (don't move), they eventually come to me, and PUSH me.

    Is there any way to make them not to push me?

  • Okay.

    Thanks a lot, and sorry for the trouble caused :)

  • I guess I have to do it this way, right?

  • But there's no plugin folder in my main Construct folder, it's located in Construct2/exporters/html5.

    So when I unzip it in the main Construct folder, nothing will be merged.

    If I unzip it into Construct2/exporters/html5/, the error it shows is as it follows:

    nable to load plugin in Construct2\exporters\plugins\RuntimeCannot open file Construct2\exporters\plugins\Runtime\common.js

    This plugin will not be available in the editor.

    Anyway... to get access to the plugin from Construct2, how shall it appear? As a property when I select a created button?

    Edit :

    ll images are edited through the "Images" section in the "Properties" pane.

    Yeah, I think so.

    EDIT2:

    Oh my, my bad. I thought this would work for Construct2 aswell, but I see it's under Construc Classic... so it's just my mistake.

    Is there any way I could had custom button in Construct 2?

  • Well, I create a folder into the /plugin folder of Construct, then dump everything in it (1 file, and 1 folder, which contain an extra file), and that's it.

    When I load Construct2, it says the plugin will not be working.

    Maybe I'm "installing" it wrong.

  • This is not working wor the current version, right?

    Is there anything I can do to have Custom Sprite Buttons?