imuniz's Recent Forum Activity

  • Hey,

    I am now for hours trying to make one single AdMob Banner appear in my game, but no success.

    I've read a lot of treads in the subject and tried pretty much everything I found. I've read the manual for the MobileAdvert plugin, which is not very useful in practical ways, and don't even show all the properties for the object. There is no tutorial.

    I have my account in AdMob, AdSense and Google Ads.

    I put the IDs on the MobileAdvert object, the Application ID and the Publisher ID.

    I have Test mode enabled.

    My events now are: On Start, if MobileAdvert is configured ~ create the banner - with show = true. (I have tried my banner ID and the Test ID, also tried "TEST" as some suggestions, but non works);

    I tried 'Show the current banner advert' both when I click a button, 'On configuration complete' and 'On banner ready', non works.

    I didn't saw the banner either on the preview or on Remote preview.

    Some guidance will be very much appreciated. So much info gets confusing for the first time. Is there problem in code? If so, how should be the code? Is that because I did the AdMob account today and it is not working yet? Could it be some problem with AdSense or Google Ads?

    Thanks in advance;

  • , I mean the maximum width of the bar is 1000.

    Asmodean , that's exactly it. Very neat. It's done, thanks :)

  • Hey guys, hope you're doing good.

    I appreciate in advance for your time.

    So, I am making a player level system, and it's all good, except for the bar that shows the points (always the bar...).

    I have a variable 'points = 0', a variable 'level = 0', a variable 'levelLimit = 100', and a variable 'levelLimitInitial = 100'.

    When the 'points' are greater or equal than the 'levelLimit', I add 'levelLimitInitial' to 'levelLimit'.

    And when the 'points' are less than the ('levelLimit' - 'levelLimitInitial'), I subtract 'levelLimitInitial' from 'levelLimit'.

    In both cases I set the 'level' to (('levelLimit' / 'levelLimitInitial') - 1).

    It means that when the player has from 0 to 99 points he is in level 0, when he has from 100 to 199 points he is on level 1, and so on. His level can be increased and decreased.

    My striving now is the bar. I have a 'points' bar that is horizontal and have 1000 of width. I want this bar to behave like in the rpg games, when the bar is filled (when the points reach the levelLimit) you pass to the next level, and the bar becomes empty.

    So, when the player has 50 points, the width of the bar should be 500; when the player has 150 points, the width of the bar should also be 500; when the player has 250 points, the width of the bar should be 500 again, and so son. I think you got what I mean.

    The answer is there, inside my mind, whispering my name, but my bad math abilities obfuscate my vision. So if you got the maths, please give me a little hand there, will be much much appreciated.

    Thanks in advance.

    Isaac

  • You do not have permission to view this post

  • Oooh, that's clever , works wonders. I'm very glad, thanks for helping in my game :)

  • , it did made some sense to me but it also left me more confused.

    I made 3 variables:

    energyPercentage = 100

    energyMax = 1000

    energy = energyMax / energyPercentage * 100

    Because that's where I came trying your advice.

    Then I set the Width of the bar to 'energy'.

    And it works as expected. The bar appear on full width. If I decrease the 'energyPercentage' the bar.Width will increase, and vice-versa.

    And this clarified a lot, thank you very much.

    What I didn't understand is where do the character energy enters?

    If I have a character with 5 of energy, where does the 5 goes?

    The bar maximum width is 1000.

    If the character has a low energy I want the bar to decrease to zero faster than if the character have a high amount of energy.

    Can you explain a little further please? I'm trying to incorporate your advice, but no success, sorry for my silliness :s

  • Ok, this has being really tricky to me, since I'm not very good at math.

    I have several characters for the player to choose which one to play with. Each of the characters have a different amount of energy. In the screen I have a bar representing the character energy, and I want this bar to decrease it's width as the character energy decreases. The energy decreases at every second.

    If the character have 10 of energy, it means that his energy will end quick. And if a character have, lets say, 100 of energy, it means he will last a little longer.

    What I am not being able to do is to make the bar behave accordingly with every character.

    How to do the bar begin with it's 100% width, no matter what are the character energy, and when the character energy is 0 the bar will have 0% width?

    How to make the bar have the same size for every character and yet behave differently according to their energy?

    If you have the maths, please give me a hand on this, I've being trying for hours now.

  • Yes kriand , this works! Thank you :)

  • Hi community,

    I have an array, and in the layout one I request it with Ajax and load the Ajax.LastData... as usual.

    But I also need to use this array in layout two, so I do the same thing in the start of layout two.

    In layout two I change some values in the Array, till here, all okay. But when I come back to layout one, all values return to the initial value. Does it means that every time that I load the Array, it will be loaded with the initial values?

    And if so, please shoot me a tip on how to work around it. I'm probably missing something.

    Thank you very much!

    Isaac

  • Oh God, that's what I was missing, the "On completed" event.

    Thank you kriand.

  • Kyatric thanks for your answer.

    I did read all this stuff already, and I did understood then, but the manual does not explain how to use the Dictionary object (it may explain here - construct.net/make-games/manuals/construct-3/plugin-reference/dictionary - but its very vague).

    I have already populated my dictionary through the Dictionary Editor.

    What I have now is:

    : On start of layout : Ajax : Request New Dictionary.json (tag "DictionaryFile")

    Dictionary : Load JSON string AJAX.LastData

    This is how the manual explains it.

    But when I try:

    : Every Tick : txt_Name : Set text to Dictionary.Get("0")

    It does not work. Any key that I put in Dictionary.Get will return zero, and the text will show 0.

    I'll be checking the use of Array for this, thanks again for your tip! But I still need to understand how to use the Dictionary properly.

    Isaac

  • You add a variable "yLimit = 1000". And then, every time that the object.Y is greater than yLimit, you add yLimit to itself and trigger the event that you want.

    I made a little example, it' in my Drive:

    drive.google.com/file/d/1DrZbXNXvIXdRJwF_-OqsgrUXO5u3IWfe/view

    Hope it helps,

    Isaac

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
imuniz's avatar

imuniz

Member since 26 Feb, 2017

Twitter
imuniz has 2 followers

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies