martdsam's Forum Posts

  • You need to set the animation itself to loop in the animation settings within the image editor. This will just set the animation to play, whatever its settings are, which are probably the default ones where it plays once.

    In the image settings everything is correct. The speed is at 9 and the loop is set to yes.

  • I want to animate an icon when the cursor is over it. But it does not perform the animation, when placing the cursor on the sprite it changes animation but it stops and does not execute the loop.

    Animation changes, but does not loop.

  • Having an array to hold "initialisation variables" per phase sounds correct as well.

    In fact, you would pick the value from the array on creation of the enemy and fill their instance variable with it, accordingly to the current phase (you would then use an array with at least two dimensions, X being the phase, Y being each of the variables required).

    To store those kind of data, an array is one of the available data structure.

    Yeah, that's what I thought. I know the performance would not change anything, just wanted to make it organized. After many tests I kept the variables on each enemy and created global variables to do the updates. And for me not to get lost in the future I created an event just for the variables of the enemies.

    Thank you for your help.

  • Yeah you just use enemy instance variables not global variables. On enemy 1 you have health, speed etc. You could also have a phase variable on the enemy. Then in your code you set if phase is 1, set all the variables to this. If phase is 2, set all variables to this. It looks like you are setting the instance variable values to the value of a global variable, I would base the values on what the enemies are doing and what phase they are in. They will have a default and then anything after that can be based on phase.

    I got it. I'll get it then. Thank you for your help.

  • Correct you would have to create multiple events...so what do you need help with?

    I want to make my code less. Today I use global variables to store information, but for that I need to create many variables in clearing my code is quite small. I thought about creating an array for each enemy, the array would contain the information for each level of the enemy. Just do not know if that would be the right thing to do dare to have better options.

    Sorry, but the code is in my language. :/

    code for enemy creation.

    Variable for enemys

  • If enemy phase 1, set enemy variables to 250/2. If enemy phase 2, set enemy variables to 300/3

    For this I would have to create multiple IFs to check phase or create an event for each phase with the appropriate parameters, I think so the code would not be optimized.

  • Neither, each enemy can have its own instance variables. If enemies share the same instance variables you can put them into an enemy family and use enemy family instance variables.

    The problem is that the values change. For example, in the first stage enemy1 has 250 speed and 2 of life. When you arrive in phase 2 this same enemy will have 300 speed and 3 of life. If I put the variable inside the own enemy I can not do this, it will always be created with the initial value which is 250 speed and 2 of life. Thanks for answer.

  • Hello friends!

    I have the following question.

    I have several enemies in the game, each has its speed, spawn time, attack time and etc ...

    What is more correct:

    1 - Each enemy has its global variables.

    2 - Create an array for each attribute of the enemy.

  • I use the native plugin construct.

    In INTEL XDK you need to go third-party plugin and add admob plugin: cordova-plugin-ad-admob.

    Have you created your account on the admob website and made the appropriate settings?

  • I use and works perfectly for my android game.

    Add event Preload interstitial too.

    You've compiled and tested? On the desktop you will not be able to test.

  • What is going on? Not appear? It happens a mistake? It happened to the banners and interstitials or just one of the two? You can also show your code to make it easier to help

  • Send your .capx. Or show your code to be easier to help.

  • In the editor screen? If so, do the following. Close tabs why you do not want to open, leave only what you want, then make any changes that require save, save, close the program and open it again. I'm not sure, but try.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just noticed that the flickering nearly disappears when turning off WebGL. Turning on "Pixel Rounding" also seems to help but only on TileMaps containing a few Tiles. But that can't be the solution, right? Did i something wrong or is this an Construct 2 issue?

    Not only tilemaps.

    In tilebackground also occurs.

    The size of the layout and the screen influence the problem.

    If the layout is less than 800 x 600 the problem does not occur.

    Perhaps this is to be a very large layout with a far far.

    The pixels are very small and the screen can not "render".

  • I tried something different, but found the same problem.

    https://drive.google.com/file/d/0B8o9UW52GFNZNXplZ1F3Nm85QXc/view?usp=sharing