briggybros's Recent Forum Activity

  • I'm pretty sure that doesn't make sense in English.

  • I'm not sure what environment you are running the project, so my help can be limited. I also do not know what your php code is.

    If this is a phone app, which I am assuming it to be. I believe SnapshotURL gives the location of the snapshot on the phone's file system, e.g. /internalstorage/yourapp/snapshots or whatever. Then if your php script gets this data what is it to do? I doesn't actually have the file you're telling it, only its path on the phone it was taken on. I do not know if Construct has a proper upload feature, but what you could possibly do it retrieve the data from the snapshot, the actual 1's and 0's in a reconstructible format, an image raster. Then you can get this data and post it to your php page for the php to then reconstruct the data from the raster and display the image.

    I'm no expert in this area so this could all be completely wrong, but I hope it helps.

  • If the object you want to rotate uses car motion, the behaviour has the expression VectorX and VectorY, which give the movement of the object in each of these axis i.e. it splits the current movement into its perpendicular components. The angle of movement can then be calculated. Taking 0 degrees as the positive x axis, the direction of movement equals:

    if x > 0 & y > 0 :

    a = arctan(VecX/VecY)

    if x < 0 & y > 0 :

    a = 180 + arctan(VecX/VecY)

    if x < 0 & y < 0 :

    a = 180 + arctan(VecX/VecY)

    if x > 0 & y < 0 :

    a = 360 + arctan(VecX/VecY)

    There may not be VectorX and VectorY values for other behavious. You could calculate them basically by storing the last position of the object and comparing it with the new version and finding the difference in x and y. This method may make the rotation rough so you may have to use some interpolation methods to make it smoother.

  • Nobody?

  • You're welcome!

  • To summarise the capx attached the alert.txt file has the contents:

    1|This is your first alert
    {id}|{alert}[/code:2u0ozydp]
    Using the first example, this is what will be returned. However, using the attached example only:
    [code:2u0ozydp]This is your first alert[/code:2u0ozydp]
    will be returned and will only be returned once. This is because the id of the alert has been stored.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bump?

  • This can be done in many ways. The very first thing that comes to mind is storing the most recent alert and then checking if the alert has changed since then. If your alerts are long then this might take up some space. A simple remedy to this would be to assign every message with an id and store the most recent id. Your txt file could look something like:

    1|Don't forget to like this on Facebook[/code:2j1kgoa3]
    
    or anything you want. Note the '1' and the '|' we can use the system expression
    
    [code:2j1kgoa3]tokenat(src, index, separator)[/code:2j1kgoa3]
    
    with src as the txt file as returned by AJAX, index being 0 and separator being '|', this will return purely the id of the alert. Make sure the message does not contain a separator character.
    
    This value can then be stored using webstorage. Every time you make an update, increment the id by 1 and then change the message keeping the separator in place. Simply create a condition where if the id retrieved is not equal to the value stored, display the message retrieved (by replacing index with 1 instead of 0) and then update the stored value to the one retrieved.
  • Yes, it is possible, and the method would be almost that of above, it doesn't even need to be a webserver you own, just use dropbox or something. You can use the AJAX object in C2. I have created an example, see attached.

  • Hello, I'm experimenting with the multiplayer feature of construct 2, and I've got to a point where all users can join a room, and each user can see everyone else etc, but only the host can move their sprite. This makes me believe it's something to do with the client input state methods and how I'm going about using them. I've followed the tutorial on the multiplayer object and can't see exactly where it's going wrong. See my capx attached.

  • There is a different export method called phonegap which provides compatibility for a wider range of devices, but I'm pretty sure it's got its downsides

  • For it to work as an app on android you need to compile it into an apk file and sign it. I'm not familiar with the newer methods of doing this with C2, last time I did it CocoonJS (Which now appears to be completely removed ) was the preferred option. The new C2 exporter for Android is crosswalk, so I would assume that tutorial is up to date.

    NB: Crosswalk works for Android ICS(4.x.x) and upwards, you may still need to use phonegap to export to lower versions if needed.

briggybros's avatar

briggybros

Member since 7 Mar, 2011

None one is following briggybros yet!

Connect with briggybros

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies