michael's Forum Posts

  • C2 is easily worth much more than scirra ask.

    My advice is, just buy it, if funds are a problem, start saving - it really is a steal already.

    Happy consructing...

  • Hmm, was looking forward to trying this, but no go for me.

    Installed on galaxy tab 2, displays the luidi logo then crashes....

  • Hi farhanx

    Not exactly sure, but I think from memory that the ghost shooter demo has that effect when you loose.

  • Hi, if you post a capx, others will be able to help you much easier.

    If you don't want to share your game, then make a capx that illustrates your problem. If we can't see what you are doing in your code then it is a bit hard to help.

  • Hi SteveKane,

    No problem, we are all learning.

    To help out a bit I have modified the example you posted. I should add that it is substantially altered as there are a number of things you are doing that are really not ideal .

    For simplicity I have changed it so it gives the results you are looking for without using Functions. I hope it helps you in some way.

    [attachment=0:27tnju6r][/attachment:27tnju6r]

    However as codah says functions are really quite easy and super usefull. I would encourage you to study the examples posted, and also the manual entry on function - it will help you a great deal for all your projects.

    Please note that in your example you were using separate spritefonts for each text(10) you wanted to display, but they were all exactly the same source image. In this case you can use instance of the same spritefont and use instance variables so that you can reference them in code if needed.

    I have modified the example to use just one spritefont. Take your time to see how that is working.

    Also I changed the sound and music sprites so they each contain the On\Off state images, this makes it easier to display the current user preference. I also used smaller images 32x32 instead of 300x300. The larger images are not such a problem with a simple layout, but if they are ever displayed on the game layout you are using up a lot of your graphics budget (4 images 300x300 - which in terms of memory usage = 4 512x512 images) just for a couple of buttons. See Ashleys blog remember not to waste your memory for more info on that.

    The capx is well commented, hope it helps.

  • 8.1 uses IE 11. Has WebGL support....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use a global variable.

    Something like this:

    gvAnim=0

    On space pressed:

    gvAnim=0: play first animation

    • set gvAnim to 1

    >else :play second animation

    • set gvAnim to 0

    Happy constructing....

  • And How should I do this the right way that it updates every time when global variable changes?

    Hi, you have an event 'on collision with sprite6' you could update the text in tne same event.

    ON collision with sprite6:

    Destroy sprite6

    Add 1 to score

    text = "score " & str(score)

  • Hmm, I made an example for you, but I see you have it sorted - great work!

    However for the benefit of others I may as well post the capx any way.

    It has a simple way and also one using lerp for nice smooth effect. Sorry didn't comment much in the capx. but it's late here in Australia.

    Hope this is useful to someone..

    [attachment=0:2ylzcobn][/attachment:2ylzcobn]

  • Hi SteveKane,

    After looking at your capx, I can see several things that need to change.

    First, all of your events for changing the sound\music settings (except for the touch event itself) run every tick - it would be better for them to be sub events of the touch event.

    Second there is nowhere that I could see where you are saving those settings to WebStorage.

    Here's a thread where I helped another Constructor with a similar question. I hope it will help you on your way as well

    how to save settings in a game

    Another thing that I noticed (although not related to your question here) is with regard to your high score.

      1) To display the high score you are retrieving the settings from WebStorage (good) and displaying it via SpriteFont (good), but doing so every time the event sheet runs (every tick - bad). Better to retrieve the value once and only update the display when it changes. 2) To save the high score you are checking the TotalDistance variable compared to the value stored in WebStorage, and if it is higher saving the result back to WebStorage - Every Tick. It would be better to check the highscore at the end of the run, and if it is higher then save it.

    Some good reading here that will help immensely in your game making!

    Hope the capx helps and, happy constructing...

  • I have read every page of this topic. I am wondering what Ashley thinks about this...

  • Woah! Really very cool.... look forward to trying this out...

  • Thanks for the reply ASHLEY.

    Now that you mention 'Touch object's use mouse input' I know I need more coffee. Can't believe I didn't remember that....

    Sorry for taking your time, and thanks for awesome software......

  • Problem Description

    Mouse input is confused when Touch input is implemented in code.

    For example: Left click on object is ignored when Touch events are implemented in the Event Sheet as well. Actually it is swapped around. So if an event says "left click on object = do this" the event will be ignored by left click but will fire when right clicked.

    Note: this only happens if the event sheet has code for Touch input as well.

    This is happening from R168 onward.

    Attach a Capx

    [attachment=0:2dsid7uj][/attachment:2dsid7uj]

    Description of Capx

    The example capx creates\destroys a 9Patch window in the centre of the screen when:

      The space bar is pressed The cog is clicked with the left mouse button The cog is touched

    Steps to Reproduce Bug

      1 Run the preview 2 Left click on the cog - Observe how the popup window displays or disappears - as expected 3 Now stop the preview 4 In the Event sheet - Please enable the Touch group 5 Run the preview again 6 Left click the cog - it does nothing 7 Right click the cog - Observe how the popup window displays or disappears

    Observed Result

    As long as the Touch group is not enabled the mouse input works as expected. But when the touch group is enabled mouse input is confused.

    Expected Result

    Mouse input to work as expected whether touch input is enabled or not

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (Don't Know)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    R168

    R169

    R170

  • Hi wolfomat

    maybe use invisible sprite with the wrap behaviour and pin your three images to that...