99Instances2Go's Forum Posts

  • You can even put the whole code segment in a group that becomes active on Drag Start and becomes deactivated on Drop so that it only uses resources when in fact a dragging is in process. Thank you!

    I suppose you can prove that? Getting the collsions check/dt under the 90 while dragging this way ? And having a working logic ?

  • Dont crop em in photoshop. They need the same canvas. Canvas size will be translated to the size of the imported frame.

    If it happens to you that the frames are differend in size. Then look for the biggest frame. Write the size down. Go to another frame. Click on the icon to size that frame. X & y is wut you writed down. Image = align center. Apply to whole animation. Magic happens. After that, you better set the origin for all frames the same.

    Sorry i missed that animation to fix.

  • Not really happy with storing UID's in an array. That way the objects have to exist. And keep on existing. Not flexible.

    Therefor:

    https://www.dropbox.com/s/68qeajb2ko8c6 ... .capx?dl=0

  • https://www.blender.org/

    But then again, takes a year to take yourself to a level that you are able to make realistic animations.

    Up to you.

    But with no work, it will not happen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you do this ?

    Did you store Browser.ExecJS("Date.now();") when logging off in the Local Store ?

    Did you Compare the stored time to Browser.ExecJS("Date.now();") when login in ?

    Did you calculate the minutes based on the diffference ?

    Did you once (in the layout start) updated stamina for the lost minutes?

    I assume you do store the stamina in the Local Store.

    Once, not during the whole game. During running game you just do add 1 'every x seconds'.

    I think it is easier to calculate the difference.. if you use Date.now()

    [quote:30jzha1r]The Date.now() method returns the number of milliseconds elapsed since 1 January 1970 00:00:00

    [quote:30jzha1r]1 Minute =

    60,000 Milliseconds

    you can simply set variable with: Browser.ExecJS("Date.now();")

  • GdiA, i did not see that this chunk of rust also contains an animation with way to differend framesizes. And therefor messy polygones. I fixed also that animation now, the same way as i fixed your other animations. Hope that is it for now. Would you plz keep all frames in an animation at the same size !

    https://www.dropbox.com/s/tkpi3u9y14di1 ... .capx?dl=0

  • Yes, the circle is unreferenced. It is not previous picked. So it just adds the circle to the previous picked list.

    An other way to understand this is .. to state that for the circle it is the first 'top event'. So its previous picked list was forgotten.

    Read this:

    https://www.scirra.com/manual/75/how-events-work

    It is way more clear then i can ever explain it. You are not the only one. A lot of beginners are using Contruct the wrong way. And i, me myself, still fall in that trap. Why i dont consider myself as a avid user.

    But serious, once you got the hang on picking objects, the system is absolutly beatyfull.

    Now you would ask, how do i forget a picked list ? Just make a new top level pick event. A function is very handy, it is a top level event.

    On more thing on optimizing. You captured that there are loops behind the scenes. If you make a condition like 'pick by comparisation' it loops behind the scenes trough all the specified objects and compares them to what you want em them to compare to. Those loops are just inevitable. And to be honest, dont worry about them to much.

    Unless they look for overlaps and collisions. Those are performance eaters.

    I have Two examples for you. This one should explain what happens. How it picks. It is importand to understand this.

    https://www.dropbox.com/s/4kofww888ajdw ... .capx?dl=0

    This one showes a way to minimize collission dedections. It comes down to make 'behind the scenes loops' that dont check for overlaps/collissions. So, forget all the other optimizing you have read about. (that statement gonna make me public enemy nr1, hehe)

    https://www.dropbox.com/s/awhfbsw9n04do ... .capx?dl=0

    Check the debugger and enjoy a collission dedection of only ONE every tick.

    Do i recoment this ? I dont know. Construct is supposed to be easy. This aint easy coding for most.

    You seem to understand those things.

  • Wel, you read those events wrong. Forget for once that "IF THIS THEN THAT" dinosaur.

    In event 2. You pick the square that is dragging. Not one square more. Not one square less. So at this moment the List Of Picked Objects contain that ONE object. The dragged object.

    For each following condition, this is the PREVIOUS PICKED OBJECTS LIST. Until you forget that list by making a new top level condition.

    So, If you gooing to look for that overlap as you do. You have ONLY ONE object picked. That condition is only true when that object overlaps itself. Wich is kinda impossible.

    In event 5 you Pick All the Squares that overlap another Square. For each following condition, this is the PREVIOUS PICKED OBJECTS LIST. So the next event looks in that list (the list of all squares that overlap another square) and filter out of THOSE ... the square that is dragging. If it finds on, the conditions is TRUE.

    Your calculation is also wrong. For the last one its (10 * 10) - 10. Look in the debugger.

    For the first one it is obvious (10 * 0) + 1. Again look at the colission checks in the debugger.

  • Nope at last question. Its still running in the background now.

  • Hmm, i had running it for an houre in the background, no errors after the updates.

  • In case you cant find it:

  • Contains value

    Searches the entire array to check if any of the elements contains the given value. For example, you can use this to test if the string "sword" is stored anywhere in the array.

    That is what the manual says about that condition.

    You inverted it.

    So, this is only true when there is at least 1 times Item.QueSoy in the WHOLE array.

    Further

    Item.QueSoy is a 'string'.

    Variable = "berries" means you gave that variable the content of a STRING.

    Variable = 11 means you gave that variable the value 11

    So, either you have a number OR a string.

    The value of "berries" = zero. The content of "berries" = "berries"

    If you want to know if something is EMPTY (that it will not contain a string) you have to compare to a empty string.

    Is variable = "" ?

    At the moment you compare: Is variable = 0 ?

    But, you did not pre-format the array. As a result there are numbers and strings in the array.

    So, either you pre-fill the whole array with "" (the EMPTY STRING).

    Or, you make the 'for every x' conditon.

    Then a sub condition.

    Value at curX = ""

    OR

    Value at curX = 0

    Have to make it an OR block.

    Since you coded only "Value at curX = 0" it filled the whole array because as string has a value of zero.

    (those that expected me to use programming gramar at this moment are laughting there a.. off)

  • This is what we talk about ?

    https://www.dropbox.com/s/ap7w3ni8wf6di ... .capx?dl=0

    This is what you could not show ?

  • Not in the inventory does not mean it is not in the array. Did you look at the array in the debugger ?

    You dont show how you let the inventory read out the array.

  • Adding to previous info.

    Say you set the names of a footbal team on the X-axis. And now you want to also keep there weight and there lenght.

    This will be a 2D array. And the adresses in the Array are like this:

    player 0 name on array(0,0)

    player 0 weight on array(0,1)

    player 0 lenght on array (0,2)

    player 1 name on array(1,0)

    player 1 weight on array(1,1)

    player 1 lenght on array (1,2)

    Reading you question, you think that you need to do this in a 3D array. Naw, not need.

    Okay, so you know the weight and you know the lenght. How do you trace back to the X ?

    Got to run trough the array with 'for each element' ..

    Use 'Compare at CurX,1' = weight

    and 'Compare at CurX,2' = lenght

    If true, CurX will be what you seek.