akaja's Forum Posts

  • I see: Platform behavior with ignoring player's input will cut it.

  • I see that in many tutorials, for instance, a snail that simply move back and forth are being directed by invisible object to turn back and forth.

    However, I am looking for something tiny bit different. I want the enemy to move toward the player's X value position. I don't need the Y coordinate part. My enemy does not have to be that smart. But it will try to go to this player's X position and it will have gravity to drag it down and does not fall through solid objects.

    What should I do to achieve this?

  • Hi,

    what are the system expressions for the current view position on the screen?

  • Thinking about a layout that has many enemy objects trying to hunt down the player. Now, I don't want all of them in the layout to hunt down the player, as there are wall, etc. In fact, I just want these enemies to sleep UNTIL the player moves forward and the enemies are visible on screen. After the enemies are awake, they won't go back to sleep.

    I can think of starting a layout and have all these enemies' private variable "sleep" set to 1. And in every tick, iterate through all these enemies, check them whether they are in the view or not. If they are, set "sleep" to 0. Of course, we will have if (not sleep), follow some event blocks.

    However, in the above paragraph, if I have a lot of enemies, I fear that this may indirectly affect performance a bit. Should I care or should I go for something better in this case?

  • Right now, the game can be paused whenever ALT key is pressed. Is it possible to tell Construct to not do this?

    One possibility is to untick Caption under Windows Properties setting, but I prefer to have the caption on.

  • Image: mediafire.com

    I got one more question: how can we create more than one hinge object iteratively? The code in the image above does not work.

    Like, from image above, if I press "right arrow", how can I create 5 Sprites with hinges connected together? How can we store UID or reference in the loop?

    Here's my cap: mediafire.com

  • OK, I think I now understand the root of trouble:

    Here's my cap: dropbox.com/s/uggff4bwrz6b4e6/bulletPhysicsTurretTest.cap

    It seems that Physics+Turret+Bullet behavior will have a bug if I change the hotspot of snakeHead to somewhere else beside the center of the image. Try it with the cap above.

    I see that Physics behavior seems to prefer Sprite to have hotspot in the middle.

    Also, if I remove physics behavior out, hotspot can be anywhere.

    Also, it seems that physics behavior somehow "hiddenly" add acceleration to the sprite on its own. Perhaps there are some contradicting logic inside the behaviors?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I am trying to create a chained worm-like creature that tries to follow and hit the player.

    I need physics behavior for hinges and turret behavior for the object to look at the player. Lastly, I need bullet behavior for moving forward.

    Before creating hinges and such, I need the head first. So I have 3 behaviors on and test it. Somehow, here comes trouble, it seems that the turret behavior conflicts with physics behavior. The object moves with a very high angular velocity (it moves round and round), when the object "acquire target".

    Is there a way to fix this? I just want a worm-like object that consists of a few chains (hinged objects) that follow the player.

  • I am following an example of scirra.com/forum/a-rope-on-a-roller_topic49497_post311730.html

    But I want something to be different:

    • when I hit a key, the chain/rope will be extended by one object.
    • (unimplemented yet) if I hit another certain key, this chain/rope will be shorten by one object.
    • (unimplemented yet) I can create/destroy a new rope.
    • (unimplemented yet) I can select which rope to extend/shorten.

    However, I am fully aware that I do not understand how this works exactly, so here is my cap: mediafire.com

    Right now, I am stuck in the first objective. Somehow, no object is extended from the initial object at all.

    So like... how does a hinge in Construct work? And what kind of logic should I use for the 4 objectives above?

  • Is there a function to "freeze" a particular object from all behaviors? Basically, I want all of the behaviors to pause for a period of time and after that, resume, as if nothing happens. Is this possible?

  • Ah, I see. But that's not quite what I have in mind. Is it possible to render the scene into some sort of buffer first, then apply this post-processing step later, then render this buffer on to the layout? Because here, only one Sprite will be affected. What about any Sprite that comes into contact at a particular area will be distorted?

  • Take a look at youtube.com/watch on 0:40. See how Mario got pull spirally toward the black hole?

    I am trying to do something like that. (the specified objects got pull toward another object spirally, like a whirlpool) Is there some sort of behavior for this? Or must I hack my way through in the event sheet?

  • First, look here: stackoverflow.com/questions/5618962/twirl-and-pinch-effect-to-images-image-distortion-algorithm

    See the images of twirl and pinch? If I want to achieve such effect in real time in Construct, how can I do it?

  • I see.

    One more question:

    <font face="Courier New, Courier, mono">

    if (MouseKeyboard.KeyDown(19)):

         System.Create("Shot", 1, MouseKeyboard.AbsMouseX, MouseKeyboard.AbsMouseY );

         Shot.Angle = 270;

    elif (MouseKeyboard.KeyDown(20)):

         System.Create("Shot", 1, MouseKeyboard.AbsMouseX, MouseKeyboard.AbsMouseY );

         Shot.Angle = 90;

    </font>

    How can I refer to the objects in Python script? The above code gives me error. If you put this code in, sometimes, one random Shot will change angle.

    This is picking problem again. How can I refer to the Shot that has just been recently created in Python code here?

  • Whenever I try to acquire MouseX from MouseKeyboard in an expression, I always get "MouseX is not an expression in MouseKeyboard".

    How can I acquire the position of the mouse?