Baconizer's Forum Posts

  • Hi guys,

    I´m working on a fast-paced, run&gun platformer, players have to shoot fast and they tend to click outside window game. I tried to hijack mouse by setting its position to the center of the window (using Window object and so). Then I create a sprite I called "CustomMouse" and I did this to establish position:

    - CustomMouse x position: " clamp(.x+mousex-scrollx, scrollXLeft, scrollXRight)"

    • CustomMouse y position: " clamp(.y+mousey-scrolly, scrollYTop, scrollYBottom)"

    This works like a charm, but only if you keep moving the mouse, because it doesn´t scroll with the layer, mouse just remains in the last position it was when you moved, and I would like my CustomMouse also going along with the layer scroll.

    Any help is very appreciated, and you will gain a place in my heart and in the game credits.

    Thnx everyone in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That is quite good, I wonder how it works with a scrolling game:

    Position cursor X: Clamp(.x+mousex-scrollx,ScrollXLeft, ScrollXRight)

    Position cursor Y: Clamp(.y+mousey-scrolly,ScrollYTopt, ScrollYBottom)

    ????

    I´ve tried that, but you have to keep moving the mouse while scrolling

  • I´m so excited, Tenjiku Demo version is out, after long months of working.

    I want to ask you not only the "Vote for us" thing (what we still need it) but also, if you could take a little time just to commet me something...I´m a single developer, terrified, and your guidance will be very appreciated!

    I decided to go CC since I had not enough money to get the bussiness version of Construct 2, and I´m looking forward to get some benefits from this first game, so I can afford C2 and keep it up creating more games for all of you. This tool is awesome.

    I´m not allowed to post links, so I write it down. You can follow Copperpick Studio in Twitter and Facebook, and support Tenjiku in Steam Greenlight and Indiedb.

    THANKS IN ADVANCE FOR EVERYTHING!! We´ll keep in touch

  • INCREDIBLY USEFUL!!!

  • I did that with a simple variable.

    For example, you want to dash and stop walking if you hit left twice:

    if press Left

    {if variable "dash"=0

    {dash=30; and here put your stuff for walking}

    if variable dash>0

    {Here your stuff for dashing, like Megaman fore example}

    }

    That´s the basic routine when you press Left key, now you need COUNTDOWN for the variable name DASH the one that let you know if you hit the key or not, so go to "Every tick" and:

    if dash>0 {dash -=1;} -----> this substract 1 from "dash" and make it zero, so if you dont press Left key in that time, you wont be able to dash....

    I won´t attach a Construct 2 example here, but you can see what Ive done in my game.

    Hope that helps

  • Sorry for not posting anything earlier, I´ve been really out because of work.

    My mother language is also spanish, maybe send a private and try to help you.

    Sorry again for being late!

  • I could achieve what I was looking for. I think is working pretty good

  • Thanks ROJOhound, as you say, it was a simple "wrong input". First time using construct, and i have old habbits from other programs.Get rid of the elses and put together everything better and now it´s working. I hope to finish this soon and upload for you to test!!! Has achievements to unlock and skins for the player, some of them very famous, like Ryu skin for example.

  • Uooo downloaded times are going up...i wonder if anyone fix it and take the game for him XD

  • Works

  • Yes that´s work, but would you mind to chek the post "EnemyAI" and see what is happening there when you have free time? By pressing SPACE you can spawn more enemies. Spend a few minutes lookig how one enemy behave, because that´s perfect behaviour and then observe 4 spawned enemies...that is exactly what I say

  • I´m not sure why my game is not working properly then...just one enemy, does exactly what it has to, if I added more enemies they get odd

  • You can just check this in another post of mine, there is a cap in which you can see how it works.

    Overlaping at offset its for collisions, Im talking about private variables bugs

  • Step 1:

    Create an sprite and give any behaviour that allows movement (for example, platform behaviour)

    Step 2:

    Create an sprite for an enemy, with some particulary easy to see animation, for example, an arrow.

    Step 3:

    Insert this code

    "if enemy.x > player.x {set enemy.angle=180;} else { set enemy.angle=0;}"

    Step 4:

    In the layout, Ctrl+MouseLeftButton to make a copy of various enemies.

    then run the cap and observe that not all the enemies turn around, some of them wait until tle player moves his X to the greates or lowest position. So, some of them turn around some of the other doesn´t....nosense.

    This makes coding an enemy AI really difficult.

    But you can make this works by inserting "for each enemy" condition, however this only works in this case, when you have private variables and the number of the sprites is big, you cannot use "for each" condition, for other reasons, because its not supose to work like that....so there is no way to clearly separate the behaviour of several enemies of the same object

  • I upload another try, keeing things simplier just to see the failure. They do jump and seems to attack and spawn hitboxes randomly, but they are really messed up. Watching the debugger, they are attacking and the value for "action" its not "atttacking", what should be. The keep sharing behaviour in a way, just one cat do it perfecttly well, stop in mid air or wherever to attack for example, more than one cat never stop their vertical speed...