ranma's Forum Posts

  • when you create a sprite, select it and on the left pane (properties) you should have the ability to add a new instance variable to it, add it, call it "whatever" :)

    then in the event sheet when you create the sprite just set its "whatever" instance variable to the floor(random(9999)) and in the next event make a foreach ordered, choose the sprite, ordered by expression sprite.whatever ascending

  • why you used "for" in the first event when you can make a "repeat 10 times" event :)

    also check my answer above, it should be fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i think he wants to do a foreach event ordered by random. if this is the case, you can use foreach (ordered) and in the expression use sprite.someinstancevariable ascending and on creation of the sprite just set its someinstancevariable to floor(random(999999)) for example. very pseudo random but as good as it can be im afraid.

  • ranma You should think more before posting your comments, because they tend to be inaccurate lately, and not that constructive...oh cmon, that one was just a one time tired like hell misunderstanding :D why the one in this thread is inaccurate and not constructive? it is as constructive an accurate as it can be under the circumstances :D

  • scirra.com/manual/107/ajax

    Access-Control-Allow-Origin: *

    also, you are loading a non existant file, why would you expect it to work? :D

  • ranma

    Thats agreed completely. I've been adjusting the official plugin to suite my needs and avoid the app secret. I'm actually in the process of redesigning the whole plugin from scratch. A lot of the breaking changes aren't compatible with the official plugin so at some point our apps will stop working. For example Facebook is now expecting that apps have the ability to handle denied permissions, the official plugin using the popup login isn't compatible with that so I updated my plugin so we have the ability to check for denied permissions through the url.

    totally true, that's the second priority reason for me I am posting this in hope this gets to master Ashley at some point :)

  • I think I remember reading that only official plugins are allowed.

    yes, using plugins that did not come with construct instalation will not let you upload your game to arcade.

    I think it's agreed most people should never adjust official plugins for fear of ruining the plugin I seem to remember you know your way around the SDK. Would it work to open up my updated plugin and cut out the reference for user token and plug it into your official plugin?

    adjusting official plugin and uploading the game to arcade will let you upload the game, but will break it, as in the arcade plugins are in their original form, not the uploaded one, so the game will work locally with modified original plugin, but will not after it's uploaded.

    also this is not the main problem, main problem is that both official plugins (dictionary and facebook) are lacking some basic and very needed functionalities. also the facebook plugin uses app secret to post scores, which is a very bad idea, as application secret should NEVER be used nor it souldn't be available client side (which javascript is) so actually every game that uses the score posting of the official facebook plugin is wide open to hacking it.

  • there is no way to use it in the arcade though, so it is useless for me, but great plugin nevertheless, great work, keep it up!

  • use the choose function. random creates a random number between 0 and say 800, choose chooses, so create at X = choose(0,800) will pick one: 0 or 800.

    cheers

  • also +1 for making dictionary object accept multilevel dictionaries or some kind of multilevel json parsing, right now facebook returns:

    {
      "id": "1234",
      "picture": {
        "data": {
          "url": "https://fbcdn-profile-a.akamaihd.net/profilepicture.jpg",
          "is_silhouette": false
        }
      }
    }

    and there is no easy way (without using tokens, which can brake later when facebook changes something) to access the data part of this object.

    and yes, you can just get the graph.facebook.com/1234/picture directly, but the above code was just to illustrate the problem with json :)

    edit: no you actually cannot, as the above picture address is a redirect to the actual jpeg and for some reason, construct does not display the profile picture.

  • Hi,

    I just noticed there is no "get access token" expression in facebook plugin. You know what would be great? I it was available. You know why? Cos you could do lots of things with it, you could use the whole open graph functionality, which would make (for advanced users like myself :) all of it available. The other thing that would be great - a custom set of permissions (as a string maybe?). Say, I want to get user's bio - i need a "user_about_me" permission + access token and send ajax it to graph.facebook.com/username

    right now there is no way to do it.

    Ashley are there any plans for it in near future? Pretty please and lots of love! :)

  • this is by design and not a bug, can be closed.

  • it doesnt seem to load second image at all, it shows the second frame of the sprite correctly, but the "load from url" doesnt seem to fire.

    I think this may be a bug, Ashley

  • first change frame, then load frame from url mate :)

  • same sprite = same texture = load from url into all sprites. not a bug. experiment with multiple frames as frames don't share textures ie:

    System->OnStartLayout: Load image from URL ...."www.something.com"

    Button->OnClick: Create Sprite, set frame 1, load image from URL ...."www.somethingelse.com"

    keep in mind that frame numbers are 0 based and you have to actually have 2 frames (zero frame and frame one) in that sprite - they can be blank as you will load from url to them later on.