codah's Forum Posts

  • Could start here https://www.scirra.com/manual/184/admob

    Follow the steps above then use

    AdmobAds: Show interstitial

    Can also use

    System: On start of layout -> AdmobAds: Preload interstitial

  • ashwin2000 c0ntra I'm getting this too. Any insight? It's reported on a Galaxy Mini 2 with "Android 2.3.3 - 2.3.7".

    user report is "just wont open. forces close everytime"

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.<package>/com.<app>}: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org.chromium.base.ApplicationStatus$2

    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)

    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)

    at android.app.ActivityThread.access$1500(ActivityThread.java:121)

    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)

    at android.os.Handler.dispatchMessage(Handler.java:99)

    at android.os.Looper.loop(Looper.java:130)

    at android.app.ActivityThread.main(ActivityThread.java:3768)

    at java.lang.reflect.Method.invokeNative(Native Method)

    at java.lang.reflect.Method.invoke(Method.java:507)

    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)

    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)

    at dalvik.system.NativeStart.main(Native Method)

    Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org.chromium.base.ApplicationStatus$2

    at org.xwalk.core.internal.XWalkViewInternal.init(XWalkViewInternal.java:244)

    at org.xwalk.core.internal.XWalkViewInternal.<init>(XWalkViewInternal.java:196)

    at org.xwalk.core.XWalkView.<init>(XWalkView.java:171)

    at org.apache.cordova.CordovaWebView.<init>(CordovaWebView.java:139)

    at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:301)

    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:336)

    at com.<package><app>.onCreate(App.java:31)

    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)

    ... 11 more

    Caused by: java.lang.NoClassDefFoundError: org.chromium.base.ApplicationStatus$2

    at org.chromium.base.ApplicationStatus.initialize(ApplicationStatus.java:131)

    at org.chromium.base.ApplicationStatusManager.init(ApplicationStatusManager.java:32)

    at org.xwalk.core.internal.XWalkViewDelegate.init(XWalkViewDelegate.java:87)

    at org.xwalk.core.internal.XWalkViewInternal.init(XWalkViewInternal.java:232)

    ... 19 more

  • To be honest you should be examining why you need 20 global variables and that you have to reset 17 of them like this. Maybe rethink your design.

  • Nexus 5 and Nexus 7, Android 4.4.4 on both, all standard.

    Edit: I just double checked on the N5, it doesn't go back to layout 1... only on the tablet Going to check on another tablet with different Android version.

    Edit2: Trying on an old table (Android 4.0.3) I don't even get the test ad!

  • Yes I am. And yes you are it says I needed SpriteFont+

    damn sorry about that. take 2

  • I was going to try and help but your .capx has 3rd party plugins so I cant open it

    When uploading .capx it's a good practice to remove all 3rd party plugins.

    Nope no 3rd party plugins. Do you have R184?

  • Use instance variables. UID can be different each time you run the game.

  • I´d would like to know if there is a way to reset all the global variables in a game except some of them. I have 20 and I need to reset 17, and the only way that I know to do it is manually.

    Any other ideas?

    Thank you!

    C2 can't read your mind But yea you can get creative, like ^^^

    How about this... copy to local vars, the 3 you want, reset all, then re-copy back from temp

    Or, put the vars in a dummy global object as instance vars..

  • Sooo you don't need to repeat the Mouse and Touch events. Just have it once, and then as a subevent:

    ----------------------------------------

    Instruccio...: Is animation "a" playing -> Instrucci...: Set animation to "b" (play from current frame)

    Else

    Instruccio...: Is animation "b" playing -> Instrucci...: Set animation to "c" (play from current frame)

    Else

    ...

    -----------------------------------------

    That's ONE step better but you can still do better. (hint: try naming your animations with digits 1, 2, 3 instead of letters..)

    Edit: I just saw BH's post, I'm sure whatever it is will do the job

  • Why does dismissing an interstitial ad restart the app? I've created a minimal app with 2 layouts. A button on the first layout goes to the second layout, which displays an interstitial at startup. Dismissing this restarts the app, going back to layout 1. Why is this?

    .capx attached. Obviously I have changed the ad unit ID. Thanks.

  • By the way do know if theres a way to preview and test a specific layout only instead of going through the different layouts

    yep just hit preview and it will run the open layout. Otherwise F4 will run from the 'first layout.

  • That works for logic but it won't work in this case because of the triggers. You can't do an expression like the one you're after involving triggers, with subevents. Just have separate events calling the same Function.

    edit: e.g.

    --------------

    Mouse: On Left button Clicked onbtnAdelante -> Function("func")

    --------------

    Touch: Is touching btnAdelante

    System: NroInstruccion = "a" -> Function("func")

    --------------

    Also your first example

    ((x = true OR y = true) AND z = true)

    is different to your second example, which translates to

    (x = true) OR (y = true and z = true)

    You could do the first but not the second.

    BTW you can also use the System: Compare expression like

    System: ((x = 1) | (y = 1 & z = 1)) = 1

    if your expression involves variables and not triggers.

    tl;dr If your first logic example is what you're after, subevents will work, otherwise they won't

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks it would be better if someone came out with video tutorials on making a full game from scratch to show how these different elements work in the engine

    There are video tutorials out there outside of this site, you could probably find one that would do the job. We're still willing to help if you can give us a better idea of your needs and why the above is not good for you. That's pretty much standard practice..

  • if find(text, "dog") is > -1 will tell you if "dog" is in the text. Is that what you want?

    Check out https://www.scirra.com/manual/126/system-expressions

  • And actually what you wrote didnt answer my question im talking about showing the graphic art pic when the player win or lose. And why this game forum cant be like other engines where you post a question and u just get an answer and not talking about reading manuals something i already did

    Don't take it the wrong way. Anyway you asked how to "display your score variable number". I also understood that to be to display your score in some text. You said you already knew how to display the win/lose pic?

    Many many answers are given here every day, it's just that when a question 'appears' to show little effort and it's been asked many times it can get frustrating. That tutorial or spacedoubt 's answer should suffice, otherwise please re-state exactly what you want

    Edit: You could show the score in a Text or SpriteFont object, or you could have a separate sprite for every digit if you want (not really necessary as a SpriteFont does that more easily). If you want to superimpose the score on an pre-exsting graphic, that would be more difficult.

    PS: it's recommened to post a capx, if possible, as this can make things clearer.