Blacksmith's Recent Forum Activity

  • Hi jeffige,

    The touch object is also set up to accept mouse inputs (so that should solve one problem).

    The touch object allows you to compare touch speed (go to add event, select the touch object and you should see the option). Also you can save the x,y co-ordinates on start of touch and compare these to the x,y co-ordinates on end of touch. So really you could use either of these to indicate whether the player is swiping or not.

    Hope that helps to get you started :)

  • pmurph,

    No Problem, glad I could help out!

    I haven't used pathfinder yet, so I'm sorry I can't be much help on this one (as mentioned, I still have loads to learn myself!).

    But its a really friendly forum, and C2'er are a very helpful bunch. So I'm sure someone will be able to assist you.

    Edit: as this is a separate issue it might benefit you to start a new thread about it. Otherwise people may not pick up on your pathfinder problem ;)

  • pmurph, good to hear you got it working the way you wanted!

  • pmurph,

    Yes you got it, add the relevant x,y values (for both objects) into the parenthesis for the distance expression.

    Not sure why you're still having problems, did you also add a comparison value into the 'second value' box?

    If you don't have any luck yourself, you can always post your .capx on the forum and maybe someone could take a look at it for you.

    If you haven't done this before, it's pretty straight forward. Just save your project as a single file (option in file menu). Then place it somewhere like Dropbox or Google Drive. Then you can post the http link on the forum, so that others can access the file.

    Also worth pointing out that using before a user name (e.g. pmurph) will alert the user that you're contacting them.

  • pmurph, don't worry it can take a while to get used to this stuff. I'm still learning new things, and asking silly questions all of the time :) I've added some steps below.

    1. Add a 'Compare two values' event (found in the general section of the system events).

    2. Click on the first value, and in the Objects expressions window select system. This will give you a whole bunch of options. Scroll down to the maths section, and you'll find the distance option.

    3. Click on the distance expression (this will add it to your comparison equation).

    4. To add the enemy & turret X & Y values, use the object expressions window again. click on either object (enemy or turret), and scroll down until you find the expressions for each items x&y. Add x&y values to the equation (for both objects).

    5. Once you've added the distance + x&y values, click on the second value box. Here you'll need to add a comparison value for your equation. So for example, if you want the turret to recognise an enemy when it gets within 50px you'd add 50 in this box.

    Hope that helps to get you going in the right direction.

    Good luck :)

  • Nice work , the water's very realistic. I really like the way it distorts the look of the ship and the rocks.

    I look forward to playing the game ;)

  • Hi trollface,

    Thank you for your efforts, but it's not really what I was after.

    Perhaps I can use a different example! Think of a set of traffic lights, when they turn red each car stops one behind the other. When they turn green, each car starts moving one after the other, not all at once. Does that help to explain better?

    I wanted to have my sprites stop. And restart in a staggered fashion (so number 1 starts moving, wait 1 sec and number 2 starts moving etc.).

    That's why my original example creates a new stop sprite behind each player sprite. I thought that destroying stop sprites in order would be the best way to get the players moving one after another and NOT all at once.

    Also I'm using a custom style of movement in my project, so bullet behaviour just won't work.

    Thanks again for trying to help though, I really do appreciate you taking the time to do that.    <img src="smileys/smiley20.gif" border="0" align="middle" />

    I still haven't found an answer to this problem. So if anybody has any ideas, I'd love to hear from you.

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

  • goblynn93,

    Using separate inputs for different objects, should achieve what you want. You can have touch inputs which also recognise mouse inputs, but it doesn't work the other way around. So your users should not be able to gain access to the admin panels (once you remove the mouse).

    Good luck, I hope it works for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey pablolink23,

    Are you exporting as cocoonjs? This is the option I tend to use. It will package your app up into a .zip file which you can load from your computer to your phones sd card.

    Then you just need to download the cocoonjs launcher app from the android app store. Once you have this installed you can run your app through it, and viola!

    If you're using phonegap, you can export as HTML5, upload this to the phonegap website. They will create several different versions for you. And you can upload these onto your phone via a QR code reader. I haven't use phonegap for a while (so not sure if things have changed), but this used to work for me.

    Edit: both these options (and more), are available when you select export project from the file menu.

    Good luck :)

  • Hey pablolink23,

    If you highlight your project folder in C2, it will open up some options in the properties window (usually on the left of the screen).

    This window contains options for adding 'Version', 'Author', 'ID', 'Description'. Version is normally filled in for you, but you can change this to whatever you'd like.

    Just fill these boxes in, and you should be good to go.

    Hope that helps :)

  • Hi goblynn93,

    Not sure I fully understand why you'd want to only have some objects with a touch input (how will the user access the other parts of the app when on a touch device)?

    I don't think there's any way to lock the touch input for specific objects. So you may just have to include different inputs (touch/mouse) for different objects, within your code.

    There may be another way to do what you want, but I haven't come across it yet!

    Edit: I'd be inclined just to go for touch (with mouse inputs), unless you absolutely must have separate options for different objects.

    Hope that helps you a little :)

  • Hi all,

    Can anyone help me with this please?

    As mentioned above, I've almost got my example working the way I want. But I just can't get the last bit working properly.

    The capx is fully commented, and I'm happy to answer any further questions if I've left anything out (see capx below).

    download capx

    I would really appreciate some advice, or any suggestions for a better way of doing this!

    Thanks everyone :)

Blacksmith's avatar

Blacksmith

Member since 1 Apr, 2012

None one is following Blacksmith yet!

Connect with Blacksmith

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies