Miyavi's Recent Forum Activity

  • 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?

  • "Every X seconds" is not affected by the framerate - it runs based on real-world time rather than ticks.

    However, I think a few people are being thrown off by a current bug in Chrome 18. If there is nothing changing on the screen, the game will start running at hundreds of frames per second and the timers all screw up. The fix is to make sure you change something every frame - try just putting an unused text object outside the layout and always set it to tickcount to fix it.

    The problem should not happen in any other browser and is also fixed already in Chrome 19 so should disappear in a few weeks.

    Thanks a lot for this.

    I was actually going mad over it already, as my timer would decrease at a random speed when idle'ing.

  • Two booleans, one for each player, which states whose turn it is.

    When the turn changes (its boolean turns off), the timer is reset to 30.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So.. I just set the timer, but a funny thing happens.

    If I'm moving, or attacking or whatever, it goes correctly, but if I just idle, my time runs out way faster.

    How I implemented the timer is with a variable which decrements per 1 each second...

    EDIT:

    Ok.. related to the timer behaviour, I just found this, so it's a Chrome bug.

    Also, new version...here

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