DalekAddison's Forum Posts

  • To get the buttons to follow the screen you need to move them to a new layer above the main one. This can help separate HUD elements from the rest of the game.

    Then you edit the properties of the layer so that the Parallax details all equal 0. The parallax details control how fast the layer scrolls when the camera moves and is often used to create more interesting backgrounds where distant mountains move slower then closer tress, as in real life. With the value at zero, anything on this layer will not move allowing it to remain on the screen at all times!

    Another hint, try controlling the location of the HUD elements with the Anchor behaviour. This way the HUD stays on the same place across multiple screen sizes.

  • ASHLEY. Wow, that's great! I didn't know about that at all. That would really help development I think.

    I wonder how this new full screen mode will work. Do you think it will activate on Construct 2s full screen request?

    So many questions! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Seen the iOS 6 updates? From what I have gathered, Safari will include a full screen mode now. The will be really useful for web app development. <img src="smileys/smiley1.gif" border="0" align="middle" />

    Edit: just found out that the full screen only works in landscape orientation. Strange, will cause a few limitations.

  • Wow, that does look good! Could it be used as a sort of NPC movement control in a Pokemon game sort of style? Looks like it could. Would have some great uses! Great work! <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Here we are! Commented for extra help! <img src="smileys/smiley2.gif" border="0" align="middle">

    Demo:

    https://dl.dropbox.com/u/46716511/TankControl/index.html

    CAPX:

    https://dl.dropbox.com/u/46716511/TankControl/TankBulletandBlock.capx

    I hope this is OK and makes sense!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you create a variable for the objects that can be destroyed you can use is to calculate the 3rd hit. You could make an event such as the collision and add a sub event first to check that the Variable ( lets say hitcount) equals 3. If so, destroy itself. Add another subevent to the collision and check to see if hitcount is less than three. If so, add 1 to hitcount. In fact, make it so it doesn't check that hitcount is equal to 3 instead make it check that it is equal to or greater than 3 (or greater than 2). That way if there is an error and for some reason hitcount is 4 it doesn't cause any problems. The variables would also be ones attached to the objects opposed to a global variable.

    For creating one bullet at a time create a global variable called say bulletExists. When creating the bullet, test as wellt that bulletExists equals false or 0. If it is, create the bullet and setting to True or 1. If not, don't make the bullet.

    When the bullet is destroyed, in the same event add An action that changes the bulletExists back to false or 0.

    In fact, there might already be a system variable you could use. Perhaps instance count? If that equals 0 shoot, else don't. That sort of thing. Maybe.

    I'll upload a capx when I can. :)

    Note: you have uploaded a caproj there. You need to upload a capx.

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Arima Thanks for that link. I didn't know that thread had been made. Unfortunately I do have the Touch object already. I think however that my recent 'progress' i.e. having a large drag and drop sprite for touch doesn't seem to work as the same effects happen when it's not there too. Meaning my progress has been for nothing! <img src="smileys/smiley11.gif" border="0" align="middle">

    That's a good idea.

    Ashley Have you seen this thread? Have any ideas? <img src="smileys/smiley1.gif" border="0" align="middle"> Has anyone got any ideas! <img src="smileys/smiley17.gif" border="0" align="middle">

    So adding the touch object works but when clicking a button and dragging it drags the whole screen anyway (To sum up). Perhaps this is just the way as Touch events are handled differently by the iOS device if it is starting an event perhaps?

    I have created an equivalent of a Button by using a Sprite and when a touch starts a small object goes to the Touch location. Then for the first time a touch happens with the small object and the Sprite the Button event happens. If that makes sense.

    Although this is a work around here, i'm trying to get music for iOS via the use of a plugin (a whole other kettle of fish I know <img src="smileys/smiley4.gif" border="0" align="middle"> ). Anyway, I use his plugin (HTML Div)to create a small media player in iOS which when played does create music! However of course it works like the button and drags the screen. Perhaps it is to do with a Touch iOS event as that is the big thing in common between a button and this media player.

    I'll get a demo up when I can!

    Here we are:

    http://dl.dropbox.com/u/46716511/DragPre/index.html

    This one shows the button problem. Touching the blue sprite button causes changes to the text labels. Open up on an iOS to see the problem.

    Here is the one with the plugin with the same problem.

    http://dl.dropbox.com/u/46716511/First%20Music/index.html

    Nothing much different here. Careful, will play a snazzy disco version of the Star Wars theme when started! <img src="smileys/smiley1.gif" border="0" align="middle"> If you are on iOS however it won't automatically start though.

    I'm not sure the CAPX will be of much use, but if you would like to see one just ask. <img src="smileys/smiley1.gif" border="0" align="middle">

    I hope this helps. Thanks!

  • Hi Everyone,

    So not much progress here. I have managed to use the same large sprite to allow interaction with a sprite which can act as a button. I have created a small sprite that goes to where a Touch begins and when it contacts the sprite for the first time it activates any process. Such as changing text etc. Still can't get inbuilt buttons to work even if I set the Drag and Drop behavior on it.

    Is there any way I can edit the settings so that it stays fixed. Has no one got any idea? This is the third time I've asked. <img src="smileys/smiley2.gif" border="0" align="middle" />

    Thanks

    Addison

  • Nice game and graphics! I've always had a thing for 8 bit. <img src="smileys/smiley4.gif" border="0" align="middle" /> Would be nice to see another one. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hi All,

    Still no solution. I did make a see-through sprite the size of the screen, then gave it the Drag and Drop behaviour and then on Drop it's position is reset. When I dragged the background the whole page did not move but dragging the button makes it move anyway. Do you think this sprite is having an effect or do you think as it is empty it is not doing anything?

    Any other way to solve this?

  • Ashley

    Thanks! This new update has sorted my one out as well. I wonder what it was?

    Thanks again.

    Addison

  • Hi there,

    I was making a test iOS web app as you do and found a big flaw in that when the screen is touched, it scrolls the page. Even if the page is the same size as the screen, the screen scrolls ( or think of it as the app being dragged). This is good for a web page but not for a web app. How can I sort this out?

    Thanks

    Addison

  • I think it's because they render a screen resolution of 320 x 480 but the screen is actually larger. I found this out myself too as I have a new iPad and when I use Construct 2 to get the screen size it says smaller than it actually is I.e. the older resolution. I think only certain apps at the moment do larger sizes and Safari doesn't I'm afraid. It's a real bother! :)

  • When I click Add Event the whole of Construct 2 locks up and I have to use Task Manager to close it. No idea why. I updated Construct 2 to no avail. I then downgraded to a non-Beta. Nothing. I have tried removing my latest Plugins to see if that would have an affect. But nothing.

    Any idea on how this can happen? Sorry I can't give a CAPX but it works on all projects. Do you think as I have reinstalled Construct it is to do with my Laptop? I might try uninstall Construct 2 entirely and then reinstalling it. I'll get back to you on it.

    Nope. No difference. Must be a Laptop problem. It works alright on my Desktop, just not on here.

    Can I give any more information to help?

    Thanks

  • Nice Project there Johnny. It sort of adds an extra it of detail to the game. Leaving the bullets shooting straight makes the game look a bit... constructed? While having it a bit waving just helps the game flow. Good job! <img src="smileys/smiley4.gif" border="0" align="middle" />