nutmix's Forum Posts

  • I have a project which has some sprintes as buttons (e.g. bt_buy)

    I was using the mouse, i.e.

    Mouse-> on left button clicked on bt_buy -> ...

    This worked on PC not not on all mobiles.

    so I changed mouse clicked to "Touch -> Is touching bt_buy" and set "use mouse input" to Yes.

    But now when I click on my buy button in a browser with the mouse, it registers about 20 button press events!

    How do I support either clicking on a button in a browser with the mouse, or tapping the finger with a mobile, without incuring many taps, only one?

    What should I be using:

    1) is in touch

    2) on touch end

    3) on touched object

    4) is touching object

    5) on toutch start?

  • When you export the project for a webserver, it wraps the game in html/css/js etc.

    I need to modify the index.html that it procudes, as it doesnt work correctly for android (doesnt get rid of address bar for full screen apps).

    Is there any way to do this, other than to re-edit the files after every export?

  • When the game is launched, it is done from a web site where you are logged in (so have a session)

    The game needs to be able to access the session parameters to authenticate.

    Also, URL parameters migh say what launage to use, or what skin to load.

    how does one access & use these?

    If they are not accessable, then I cant see how construct 2 can be used to write games lauched by a logged in user.

  • I am not entirely sure that android browser can have no address bar.

    Interestingly most sites on android browser display no address bar once loaded, e.g. will-hill.mobi, or google.co.uk

    Some sites have the address bar glued to the page after loading, including any game generated by construct 2, www.bbc.co.uk, and even htc.com

    I assumed the problem was a bug in construct 2, but perhaps I was hoping too much for out of the box android support.

    Thanks for the js. how does one go about putting custom JS like this into the page generated by the export process? Does one just edit the exported pages each time?

    I can also try using charles proxy to analyse the difference between sites that work and dont work, but most of the minify the js, so it may not be possible.

    Thanks for the help!

  • Havent quite figured out how it works, but the result is prefect.

    +1000 credits to R0J0hound!

  • But there are numerous ways to workaround this (groups that you activate/deactivate,

    Very sorry to be a pain, do you know of an example or tutorial to see how groups are used in this way? The manual page states they can be activated/deactivated, but I didnt see how that can be of use as a programming construct.

  • Indeed!

    Is there an existing thread for a user defined event discussion, with some of the preferred workarounds?   

    user evens are much more elegant than functions/groups/importing event sheets (which is basically a GOTO) I would suggest.

    Coming from an very heavily event oriented actionscript and MVC/Java backgroud, Im dying without them. Stupidly I spent a day looking for them, feeling sure they were there as they are so simple compared with some of the really difficult stuff C2 implements brilliantly (and with only two guys?)

  • Good advice Kyatric - RTFM. I'll check out that new-to tutorial in more detail. I must admit, if I had a paper copy of the manual, I would read it cover to cover before starting. I'd even pay for it!   I did the beginners tutorial, but couldnt find a follow on.

    I am impressed with construct 2s brilliance in every area except for one vital flaw: I would propose that not having user defined events (ideally with parmeters) makes writing clear code (I mean the event sheets) without duplication difficult.

  • Also, it doesnt center the game - the letterbox scale is putting the content on the left, and the black bar on the right. On any PC browser, it centers it. Any ideas how to get this working on Android?

  • Have a game targeted at the android platform with 480x800 (e.g. the HTC desire or Samsung Galaxy S II).

    I set the project and layer width and height to 480x800, and set the fullscreen mode to letterbox scale.

    When I view the game on the handset via the built in LAN preview on port 50000, or if I export the files to a normal webserver on port 80, The game comes out wrong as it keeps the address bar at the top, and so puts a big black stripe on the right hand side.

    When I go to any other website with the handset, after a few seconds the address bar slides off the top to give the page the entire screen. ive tried probably 100+ sites, mobile and normal, and they all do this except the one generated by the construct 2 system. How is the construct 2 breaking it, when all other sites work?

    I have tried all combinations of:

    Clear Background

    Full Screen in Browser

    Any ideas how to fix? It looks terrible.

  • Ok, found the solution.

    The key is that when you open the image/animation/frame editor windows, you wont find the editable properties in there - they appear in the properties window of the main window underneath (I would never have found this). Anyway, now you have the animation properties, changing the repeat count to 0 and the speed to 0 stopped the animation (phew).

  • After days of looking for this, Ive finally found it. The Animations window was actually underneat the Edit image window. The properties are automactially displayed on the left of the main construct 2 window, and allow you to edit the speed etc. Easy to miss.

  • If I create a sprite, then add some extra frames in the editor thing, thats an animation right?

    The manual says there is an "animation bar" - I cant find this, anyone know how to get it?

    In the manual, it says you can chage properties like loop and speed. Where can these be set? I have R99. when I click on properties->Animations->edit it crashes Construct 2 of course, so the work around is to double click on the sprite, which bings up the image editor and the animation frame thing.

    But I still cant find where to set the loop and time etc.

    Basically, I just want to find a way to stop the animation running automatically when the game loads.

    Thanks for any help,

  • If I drop onto a new project a single image as a sprite, then add a second frame, when I run the project, it always shows the first then the second frame. As Im trying to simulate a button, I dont want it to animate at all - ever (I just switch between showing frame 0 and frame 1).

    Any idea how to switch the auto-anmation off, so on load it only ever shows the initial frame (i.e frame 0)?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have two images, and want to dissolve one to the other.

    Currenty I have one on top of the other in different layers and use the fade out behavior on the top image, but this is only temporary.

    1) Is there any built in dissolve effect, either between two frames of a sprite, or between two sprites?

    In the game, there are 10 possible images underneath to desolve to, but the top image (dessolve from) is always the same.

    The deslove can be quite blocky, and doesnt need to be random.

    2) The other problem is that if the player clicks to end the game, I need to be able to stop any desolves currently in progress (or at least find a way to wait for them), and reset them all to the top image. This is currently failing with the fade out behavior, as if its still fading out when they end the game, I reset the opacity of the top image back to 100, but as its in mid-fade, it screws up.

    Any ideas?

    Many thanks!