Psychokiller1888's Recent Forum Activity

  • IID is a runtime generated IndexID that is not referenced in the xml files, while UID is a UniqueIDentifier used and referenced in the save xml files

    IID indexes the object according to its runtime creation timestamp, by type, and UID ensures a possibility to reference the object by being sure to never return more than one result. IID is not unique and volatile where UID is unique and by definition should never change (which is not the case in C2, strange, but well, definitions....)

    I'm still asking what defines, for C2, the first placed instance of a sprite

  • I'm asking a simple thing: What defines, in the files, the veryy first instance of a sprite you placed. If you say its UID, then it's bugged

  • That's why I ask, what defines "the first one created".

    As you can see in my screenshot above, the sprite InterfaceElement with UID 1 (uid 0 is something else, we don't care, it's another sprite) is set with positive width and scaled 1:1, placed on a placeholder layout. The layout that loads first also uses this sprite, for the interface, manually placed in layout. Some are normal, others are reversed. Then comes the code, that creates also a few InterfaceElements, but they are reversed and squeezed... So, my point is: What defines "first created element", because obviously it's not the one with the lowest UID

    I am not going to delete all InterfaceElements sprites from my roughly 40 layouts, all together what, 500 InterfaceElements manually placed, and recreate everything. I will rather manually fix that in the xml files

    I talk about local testing, no chaing issues (and browser has caching disabled for testing)

  • No, I'm saying that even if the very first created sprite in my project has the default width set positively and is scaled 1:1, the code generated ones spawn reverted. The code generated ones even take the instance variable values from another sprite placed somewhere else, dunno which, but not the very first one. So it's not taking the very first created sprite, but some random others

  • And how exactly is the first instance defined? Is it the one with the lowest UID? Because after a couple of tries, this is not the case...

    I added one of the sprite on a placeholder layout, I manually opened the layouts xml file, made sure this new element gets the UID 0 by swapping with another one in another layout. Still, the problem persists. Even instance variables are copied over, that's totally not ok, they are not to be called instance variables in that case

  • What I did to overcome this now is:

    Add to those sprites an instance variable called "layoutPlaced" with default to false.

    When manually creating a layout and placing one of these sprites, we set it to true

    In a super sheet, I do "onCreated / if not layoutPlace setScale 1 setMirrored false setFlipped false"

    This way, all the code generated sprites do fall into that condition and get defaulted where all the manually placed ones stay as we did place them

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But but but, I do get that... But the instance vars aren't copied over either, so why aren't the width and Co non static also? Placing one sprite in a fallback layout is what we do too, but the ones created/manually placed in other layouts took over...

  • Hi!

    Not posting this in bugs, as it surely ain't one, but maybe more a weird behavior....

    Let's make things simple. Open a new project, create one sprite, draw an arrow left looking, place it on your layout.

    Add an event in your sheet to create one more arrow

    The result is, without doubt:

    Now, mirror the manually placed arrow by using a negative width. (Ban negative width? Give me another way to do it without doubling my frames and being able to see the result on the editor, meaning not having to preview the layout to see the end result)

    Without changin anything in the event sheet, just preview. Weirdly, the result is:

    Now, I say weirdly, why? Maybe it's wanted, but you have to explain it to me then. Programmatically thinking, this looks to me like a static variable conflict. Why? On the right side, we have our Project tree, with our layouts, sheets, and objects. When dragging an object in the layout, we instanciate it, create an instance of it. Thus, all it's attributes are set to the object's default. When we create through code, we do instanciate it too. If it's not that, then the whole idea is really looking like that and so are the guides talking about instances, the functions referencing to the "instance" word etc etc and that really needs semantic fix then

    So, by looking how Instance Variables and Common work, to me it looks like "Layer", "Angle", "Opacity", "Position", "Size" are declared as static in the object (where instance variables are what they are called, non static instance properties), explaining why, after setting one object's width to negative, it spreads and infects the original object. I know the category for those is called "Common", that's a sign.

    It is also easily understandable by looking at the .caproj file:

    Nothing references the base width, height etc etc

    So, anyone has a solution for me to not have my sprites flipped by default when code created if I manually placed one of them and reversed it?. Sorry, the project is very wide, and I won't add setMirrored = false, setFlipped = false and setScale 1 after every sprite creation throughout the many event sheets and sprite creations....

    Cheers!

  • Sure it is. Send a message from your game, capture that message on the controller, within onMessage, then use jQuery to set a div's background color per exemple, based on the message received

  • The AirConsole plugin got updated to API 1.6.0 adding ads support, AirConsole team just merged my Github pull request.

    Don't forget that implementing ads in your games is due for February 2017

    Added in version 1.4.4

    • Update to API 1.6.0 don't forget to update your controller.html api link!
    • New conditions:
      • OnAdComplete - Trigger - Triggered when showing ads is finished - Use it to unmute your sounds per exemple
      • OnPremium - Trigger - Triggered when a premium device joins or a device gets premium - Use for special cases for premium, premium don't get ads per exemple
    • New actions:
      • ShowAd - Displays adds on screen and controllers. Triggers OnAdComplete when done
    • New expressions:
      • IsPremiumJoin - Returns 1 if the last controller that joined is premium, else 0
      • IsPremiumMessage - Returns 1 if the last controller that sent a message is premium, else 0
      • IsPremium(deviceId) - Returns 1 if the deviceId is premium, else 0
    • Reordering expressions by using categories

    Check it out on Github:

    Official AirConsole repo: https://github.com/AirConsole/airconsole-construct2

    My fork: https://github.com/Psychokiller1888/airconsole-construct2

    Feel free to contact me for additions, missing parts etc etc

  • Ashley Well, I have this issue since the day I bought the C2 license, about a year ago and even before on the free version, same for Wert. Crazy that this driver bug only affects 9-patches and that in the 50 driver versions nVidia released over the year none actually fixed a display bug. But logical also, because nVidia doesn't know about C2, and this bug only targets C2 and the very specific 9-patch object........

    andreyin

    Yep, turning the preview effect to "no" actually resolves the problem for some reason, nice find!

  • Ashley

    Triple post yeah, but I don't want to edit my last posts, I want you to get notified when I do my testings... This is right now, at work, yet another computer with a little GeForce GTX 550 Ti on 368.81 (common, it has nothing to do with that)

    https://puu.sh/sogom.mp4

    This one is even better, it shows in some sort, why it bugs. See how they work and just by scrolling they don't anymore? Don't you feel like somehow the thing gets out of the viewport and is turned off? So please, consider this bug as it should... Or we teamviewer, I take control of your laptop and I show you how it bugs on your own computer

Psychokiller1888's avatar

Psychokiller1888

Early Adopter

Member since 1 Apr, 2016

None one is following Psychokiller1888 yet!

Connect with Psychokiller1888

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies