dop2000's Forum Posts

  • Eren There were many version of Cocoon plugins, he probably doesn't have the one which is needed to open the project.

    mori29 If you send me your game, I can try removing the plugin. I have done this before. My email is here.

  • Or, better yet, post your capx with the things you tried, and I'll tell you what to change.

  • ch00se RozekEnhance It appears that ads don't work in Enhance plugin.

    My colleague and I have tried it many times in the past and I spent several hours experimenting today -

    When I enhance your sample app, all Admob banner, interstitial and rewarded ads work fine.

    But when I enhance the demo project included with the C3 Enhance plugin (using the same Admob APP ID and keys) - ads don't work. An alert like "Banner is not ready" is displayed every time.

    .

    I tried calling JS functions directly, for example "Enhance.showBannerAdWithPosition(Enhance.Position.BOTTOM);". And when I do this, banner is still not shown, but there is an error in Logcat log:

    enhance.sdk.EnhanceWaterfall: ERROR, no waterfall defined for: overlayAd

    I also noticed in the log that with the sample app there is some Waterfall payload/SDK downloaded on startup. And with the Construct app this doesn't happen. Can this be the reason why ads don't work?

    .

    EDIT: I tried C2 and C3 plugins, building apk using Construct build service and Cordova CLI. The result is the same - ads not working.

    Opting-in for GDPR doesn't make any difference, and I don't think this problem has anything to do with GDPR as I live in the country where it's not required.

  • Thanks, Ashley. I've studied the documentation. But as I said, as someone who is not very experienced with Javascript and has little understanding of how Construct 3 works internally, I still struggle trying to write my own scripts.

    It would help beginners a lot if you could maybe add more code snippets to the documentation, or create a few more templates/tutorials.

    All available calls are documented in the scripting reference section of the manual. However behavior calls aren't yet supported - it's on the todo list.

    What about object's conditions and actions? For example, "Sprite Is overlapping another object" or "Dictionary set key" - how do I call these from the script?

  • we have to check if an item exists. and we have a if it's missing condition.. so does just checking if it exist then "instantiate" the item? or perhaps "set item" is what creates an item if it doesn't exist?

    Checking if item exists doesn't create it. But if it does exist, you don't need the extra "Item get" step.

    So really "Is Missing" isn't needed at all for actual storage.

    It may be useful, for example as an indication that the game is launched for the first time and you may want to show some intro to the player or something like that.

    But in your example when items are missing, you are setting them to 0, which is already the default values for variables. So here this isn't really needed.

  • part12studios Dictionary allows to store multiple values in one Local Storage item, so you don't need as many events as when you store each value separately. When you have 2-3 values, it's not much of problem, but when you need to store 10-20 items, the code may become pretty messy.

    The example you posted has a few small issues - you don't need "Local storage get item" action in events number 2 and 4. And there is no point in setting items to 0 in events 3 and 5.

    Also, there is a new feature that can be used with local storage, see this video:

    construct.net/make-games/releases/beta/r149

    .

    So basically you can read everything in one event:

  • If you don't adjust bullet speed on every tick, then it will have a different problem - bullets shot in the same direction when moving and when stationary will have different speeds. Demo:

    dropbox.com/s/6moj4j2q3dlup38/directionShootTest.c3p

  • HERO on collision with Enemy : Subtract 1 from HEART
    	System compare variable HEART=0 : Wait 2, restart layout
    
    HERO on collision with Health : Set HEART to min(3, HEART+1)
    
    Every tick : HudHearts set animation frame to (HEART-1)
    	: HudText set text to HEART
    
    
  • You can add dx and dy variables to Player and do this:

  • Ashley, is it possible to implement overloaded functions (as in Java for example)? Where you can have 2 or more functions with the same name, but different sets of parameters?

  • You can adjust bullet speed, when bullet is spawned set bullet speed to (self.Bullet.Speed+Player.Platform.VectorX)

    You should probably do this on every tick, otherwise the bullet will continue to move too fast or too slow when the player stops:

    set bullet speed to (self.BaseSpeed+Player.Platform.VectorX)

    Also see this post for more examples:

    construct.net/en/forum/construct-2/how-do-i-18/constant-speed-129201

  • You are editing "On timer" event, parameter Tag should contain a string tag of the Timer. Duration expression returns a number, that's why you are getting this error. Why do you need it here anyway? If you want to compare timer duration, this should be in a separate condition, for example -

    System compare two values: Sprite.Timer.Duration("tag")>5

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great analysis, !

    Yeah, I miss the flexibility of the old functions, where you could pass any number of parameters and let the function to decide what to do with them..

    .

    I want to add one small UI issue - when you have lots of functions in the project, "Set return value" action becomes buried in them: