Aphrodite's Forum Posts

  • I have figured out what causes it and how to mitigate the problem, at least in my case.

    I have a sprite which has 6 frames, each one a different solid colour. They happen to be 256x 256

    The first frame is blue, second green, third red etc.

    I place a sprite and resize it for my needs and set the frame to 0 (blue). When i preview its fine but on export i see the edges of the sprite go from blue to green. Changing the frame to green the edges fade to red and so on.

    The way i have found to stop this is basically to double the number of frames. So 2 x blue, 2 x green, 2 x red etc. Then by using frames 0,2,4 it stops the colour bleed.

    Hope this makes sense and is of some help.

    If you add one transparent pixel of border all around each frame, does the problem still occurs?

  • Aphrodite

    yes calling works, but to be usefull, on funtion "string" should take the string of the variable

    this way you can just rename the functions at one place

    not sure how a dictionnary would help... to keep track of my functions?

    Now that I think abut it, the dictionnary may be more confusing..

    Personnally I like to have all functions in one event sheet, maybe you could do like this:

    Global variable : FunctionName = "My function"

    On Function "My Function"

    Global variable : FunctionName = "My function2"

    On Function "My Function2"

    So you have the two things to edit in the same place

    Then you call functions only with the global variables

  • danialgoodwin

    i think it worked with rex function in the early days, i didn't need this because i wasn't using functions alot but now it would be helpfull

    AllanR

    its on function "name" , i want it to be a variable

    so i can rename my funtions more easy

    does that work for you?

    vtrix

    Never worked for me to set the function, however, I think you can call functions with a variable (not sure about that).

    Maybe a dictionnary can work for that?

  • you could also look into the layout scale if needed

  • blurymind : The last time I tried it, I couldn't find a lot of behaviours (I think they call it automatismes in game develop, could find a platforming one, it is not a big deal but still that was something I think it lacked), nor a lot of object (I couldn't find any tiled background like, maybe it is just me)

    But it is still a nice little program I ust say, don't know if the HTML5+Javascript produced is good though.

  • "Hi,

    Is it possible to copy events from one event sheet to another? Rather than having to type it all out again?"

    Yes, you can select the events, and do a Ctrl-C to copy/Ctrl-V to paste

    However you have to make sure that it is possible to paste the events (aka: each local variable and objects are usable)

    If you want to re-use a lot of time some events, I suggest you look into :

    The includes: Includes in the manual

    The function object: Functions in the manual

  • When the game ends:

    If Score>HiScore :

    -Set Local Value "HiScore" to Score

    -Set HiScore to Score

    Ingame:

    If Score>HiScore :

    -Set HiScore to Score

    When you begin the game:

    On HighScore (the text object) created:

    -Set Text to "HighScore : " & WebStorage.LocalValue("HiScore")

    I think that will work

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "    set local value HiScore to WebStorage.LocalValue("HiScore")"

    Do > Set local value "HiScore" to HiScore

    and to get the value back from the webstorage:

    Do > Set Text to WebStorage.LocalValue("HiScore")

  • It works perfectly in Node-Webkit (and probably other browsers). It appears that i might have to switch browsers (assuming that this is isolated to chrome). >_>

    Update: It appears that it indeed might have been have a problem with the host, as images from dropbox load just fine. But why did the Webkit work, then?

    One theory (I can be wrong) could be that Node Webkit applications don't suffer from the same restriction, as the C2 manual stated that browser manufacturers havechosen to do this (for security reasons)

  • I think the problem is with permissionsof the server, some website let you do that, others don't, the manual says:

    Load image from URL

    Load an image from a given URL. The current animation frame will be replaced with the image. It is not shown until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image. The Size parameter sets whether the Sprite object will be set to the image size when it loads, or whether to keep its current size and stretch the image.

    and so the part about cross domain request here counts: scirra.com/manual/107/ajax

    EDIT:Ninja'd by the OP,that was weird

  • LittleStain

    Not sure you've experienced the same as me...

    There is no centre if the screen size keeps changing. I need to do this at run time so that I can support a lot of screen sizes. With scale outer, it doesn't scale from the centre, it scales from an edge.

    I could add it to a parallax layer, but if I don't know how many pixels the screens are different by, it's no use to me.

    In this example, it could be anywhere between 100-200 pixels, but of course, there's no real way of knowing.

    I'd have thought window width would be what I need... but it doesn't work at all, even in my C2 previews.

    You could use the viewportLeft(layer), viewportRight(layer), viewportTop(layer) and viewportBottom(layer) expressions to get the center at runtime

  • :

    Also I think the collision check is better done before checking the variable, due to the change in C2 collision detection (I could be mistaken).

    For the variable, I don't know at all though, maybe you could try alterating a non global variable to see if that changes something (like a text value), even though I don't think this is worth it in the long run

  • "you can try implementing the scrolling hack using the Browser object's 'Execute javascript' action."

    You mean you were just scrolling the page down, and so the iOS bar disseapeared? (like on some phone when you scroll the page down, the bar does not follow?)

  • If that is really true, it should be corrected, mobile without fullscreen just does not cut it, I am against workarounds, but maybe keeping it and replace it when a better working solution is found.

  • I think each variable, each include, each group, each sub event, etc.. count as one event, only commentaries does not count as that, If I am wrong, hope someone corrects me (you should be able to see the number of event at the bottom of the program)