nimos100's Forum Posts

  • Hmmm cant you just force fullscreen in browser?

  • Iphones Ipads etc use other resolutions. You can find them on the internet...as I cant remember them :D

  • Not sure if it works, but you could try something:

    If mouse.x < 50 set mouse.x to 50

    If mouse.x > windowswidth - 50 set mouse.x = windowswidth - 50

    But no clue if that works :)

  • You can use "On collision with another object" or "Is overlapping another object" and then add another condition to be sure that it only triggers if the player is actually punching or kicking at the same time.

  • Sound like there are a never ending loop, causing the game to freeze.

    There are several ways to check for collision.

    "On collision with another object" and "Is overlapping another object"

  • I think your conditions might be wrong.

    When the "animatehitbox" collide with "playerhitbox" it start the attack animation. which seems fine.

    However your Idle animation is started if "animatehitbox" at anytime is not moving and are on the floor. I don't know what you game is about. But would assume that "animatehitbox" spends most if not all time on the floor?

    So if it at any point stand still it will trigger the idle animation, so could be that as it collide with "playerhitbox" it stops to do an attack and therefore triggers the idle animation.

    To solve it, you could add a boolean variable to "animatehitbox" called "In_combat" or something. And in the collide "on hit event" set it to true.

    And in the "idle trigger event" you add another condition that it will only be true, if "In_combat = false"

    Also think it could be a good idea to use "continue from frame" or what its called for your idle animation, other wise you might get jumpy animations as you can be sure which frame an idle animation is currently at as it get interrupted. That way you wont need two events, but can do it with just one.

  • UPDATE:

    Solved it by resetting the Dialogs in Preferences. Probably because of the F4 used to hide/show them, and it being the same button for Running the program.

    Link to .capx file (required!):

    dropbox.com/s/ftc8rnzmlultqm3/Test.capx

    Steps to reproduce:

    1. When you want to assign value of "int Test" from one sprite to the other sprites "int Test" value. Or whenever you have to assign a value.

    Observed result:

    Not sure if its a bug or i have accidently turned something off, and not really sure that the capx I have linked will help.

    But when I want to assign a value to something or want to test a variable, you normally have a window, where you can browse other objects so you don't have to remember the name of everything, but you can select it in that window.

    For some reason that window doesn't show. So I have to remember the name of all variables I have created and those that comes with construct 2.

    For instant I normally use Static names for string variable that I store as Global static variables and normally If I want to test these for whatever reason or assign that name to something, I can normally just select it in a list. But that doesn't show. I get the dropdown list when I type something.

    Expected result:

    That I would be able to browse to the correct variable that Im looking for.

    Browsers affected:

    Chrome: yes/no

    Firefox: yes/no

    Internet Explorer: yes/no

    Operating system & service pack:

    Windows 7 service pack 1

    Construct 2 version:

    r146 and r148 beta

  • I took a look at it, and its really weird, but I have experienced similar problems with my game. Where the touch suddenly loose connection to the mouse or what to call it, and it just stop responding to anything or does really weird things.

    Unfortunately I haven't used touch that much, but it could look like there might be a bug with the car behaviour and touch when used together. I had to drop the car behaviour in my game, but that wouldn't work for you, that easy as in mine.

    But I think you could make it by setting the X, angle and Y position of the tank it self, but it could be quite complicated compared to the car behaviour.

    Also it seems that the tank hits an invisible wall and after that it just looses all control. However why it react to something that aint there is really weird. If you don't get any other feedback I would post it in the bug forum, because it looks really weird.

    I even tried to pretty much disable everything that could be disabled and still it locks up.

    Anyway that my best suggestion unfortunately.

  • austin

    <img src="https://dl.dropboxusercontent.com/u/109921357/Tests/Test.png" border="0" />

    When a new game is started "Game_lost = 0" and when the game is lost its changed to 1.

    Don't know if this helps, but this is the error it give.

    <img src="https://dl.dropboxusercontent.com/u/109921357/Tests/Test_2.png" border="0" />

    When you close the error message a black box where the ads container is shows up, but the game wont load.

  • When the enemy hit the player you need to subtract from HP and not HPMax.

  • Hi Austin

    I tried adding the clay.io and I have some problems, I have added an

    "ad" to my main menu, that refreshes every 15 s, and it works fine. However I then tried to make it so when the player is done with a game, and the high score is showing an "ad" will show underneath it. And when the player presses retry I want it to go away. However whenever I use the 'show' and 'hide', I get a .js error saying.

    "Uncaught TypeError: Cannot call method 'Show' of undefined."

    Im just previewing it through C2. Are there anything special about using these actions for it to work?

  • I have several questions that I hope someone can help me with.

    So I made this game, and now I would like to try to add it to chrome web store, just to try it. But I would like to make it so it shows ads before going to the actual game. And was thinking about putting this in the preloading screen.

    Can this be done with cocoonjs, or is that only for phones and tablets?

    I can see on there website that you can compile to chrome web store, but as I understand it you need to be a premium member to use it, which I guess you can always try to apply for. Furthermore it also seems like you need an account with someone call mopub who only seem to support IOS, android and mobile web.

    Anyway I tried just to add the cocoonjs to my game, and add "show ads in top" and "bottom", but cant find any information about how they work. Or how you are suppose to use them. Does Ludei or mopub or whoever controls the adds, figure that out on there own? And does the cocoonjs in C2 make sure that they are placed the correct place or what?   

    Or how would you even do something like that, if its possible?

  • I looked at you program and got it working, but what exactly the problem is im not sure. However I think that your background music might be to big or something that it causes some problems. However Im not sure and if that's the exact problem.

    But you can fix it like this.

    1. Make that "Game_loaded = 0" variable that I mentioned.

    2. And in the "Start layout at the very bottom set it to 1.

    3. In the "bullet_created" add the condition "Game_loaded = 1".

    (This is where it gets weird as that should work.)

    4. Move the play music in the "Start layout" event to the top of where you have the others. (That's simply because it easier to work with that way ) <img src="smileys/smiley1.gif" border="0" align="middle" />

    5. In the top of the start layout before you start playing the sounds, add a preload for both sounds. Especially for the music, as its the one that's causing the problem and not the bullet sound.

    That should make it work.

    I would strongly suggest you to use groups and more event sheets and just include them in the main one, that will make it a lot easier for yourself to debug and work with the program, especially when it gets bigger.

    Personally I would organize it like this if I were you:

    Make the following event sheets:

    "Enemies" - Everything that relates enemies you add here.

    "Player" - Player controls, death. Weapon sounds etc.

    "Game" - General game stuff, like "New game", "Exit game", "Turn on/off sound", "Playing music" and "Score"

    "Scenery" - Everything that relates to the background like creation of stars etc.

    In regards to using groups, its very easy to only show what you need, and to find stuff that you need.

    For instant if you have a "Player" event sheet. You can make a group called "Controls" and under that group you add all stuff that relates to player control, and in the group description you can short explain what the category does.

    Lets say you wanted you spacecraft to be able to do some speed boost. You could just add a new group underneath the "Control" group called "Boost" and then you have everything organised.

    Anyway just an advise, as I have dumbed a lot of projects in the pass, because I didn't organize them, and at some point you simply loose track of what's happening and finding some error is really hard. <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You link doesn't work.

    Anyway here is an example of how to do it.

    It uses a tracker for each tower, that will trigger the tower when an enemy is within range. And will cause that tower to shoot. As it would in a game like Plants vs Zombies.

    Tower test

  • Ahh ok I had the exact same problem.

    I solved it this way.

    Make a Global variable called "Game_loaded = 0" or something, so if this is 0 you know the game "haven't" loaded yet.

    Next, and think this is a good idea to do no matter what, as it will remove a lot of potential problems later on.

    Make a "start of layout" and here you destroy all objects that are not needed. Like enemies, rewards, bullets and so on. And stuff like HUDs, background, that should be permanently visible you don't destroy.

    At the end of this event when all objects have been destroyed you set "Game_loaded = 1"

    And then in the "Bullet fired" event you just check if "Game_loaded = 1"

    Another way is that you might be able to just mute the sound before you destroy it, and then just unmute afterwards. In a "Sound finished playing" or what its called, think that might work as well.