vicplay's Recent Forum Activity

  • Nevermind, I found a workaround in my plugin logic so it does not need to know the current event running it.

  • also tried to instantiate an EventSheetManager with

    var manager = new C3.EventSheetManager(this.runtime);

    with no success since manager.GetCurrentEvent() returns null inside a condition's method.

    Ashley could you help me out on this?

  • The v1 Runtime class had methods like

    GetEventSheetManager();

    GetCurrentEventStackFrame();

    GetCurrentEvent();

    Is it possible to expose this getter methods somewhere in SdkV2?

    I just need to access the current frame condition index and the current event _sid

  • +1 would also like to know if it is possible

  • I figured out that the game is failing to download resources when the url is https.

    Back in Oct 22 it was crashing, now it is triggering the Browser plugin "is Downloading Update" forever

  • On the other hand, calling functions to modify instances is like nightmare fuel.

    Not being able to modify instances with reusable code is pretty much being left with limited useless functions, sadly.

    Any other professional engine let you instantiate and modify instances in the same tick at any point of the code as long as you call them after instantiating. That`s why it is a bad design of C2. For me it is a bug because that`s not how functions should work but it seems that it is just a terrible limitation of the engine

  • Are your C2 projects on a HTTPS url?

    Here I have this problem only when the game is HTTPS

    If it is HTTP it works just fine!

  • Actually they don't exist - fully. You can not pick, except by UID, until the next top level event after an object is created. There are countless threads on this - it is just part of the design.

    With functions not even if you run the function in a separated "top level event" it will not work, you will have to wait until next frame. Without functions it works. Again... either a bug or a bad design

  • Nevermind you're doing something weird.

    Objects don't really exist till the end of their event.

    I disagree (Run my Test3). Without functions you can freely modify a created object right after "Create Object" and everything will work just fine.

    If you have the SAME events inside a function it has the strange behavior of changing instance variables just inside the function context for that tick.

    Functions are useless if you have to wait 1 tick to access values modified by them.

    The problem extends not only for objects created in the same tick. If you have a simple function that changes an instance variable value of an existing object, log the new value inside the function and then log the value AFTER running the function you will see that the value is logged correctly ONLY inside the function. The log AFTER the function was called will log the old value until the next frame.

    This is either a bug or a terrible design

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do everything in the same tick without functions and can't with functions. Objects DO exist at the time they are created.

  • Problem Description

    You can`t compare instance variables of objects that has been set inside functions with the oficial Function plugin. Let`s say you create a function called SET that sets an instance variable value of a sprite to 1 (And logs it`s value)

    Then you create a function called GET that only logs the value of the instance variable. If you run SET and then GET after (Inside an On Start of Layout event) the SET will set the value and correctly log the value. The GET function that runs after will fail to log the value (Will log the old value stored in that variable)

    That being said... you can`t pick objects based on their instance variables unless you wait for the next frame. Waiting for the next frame is a terrible workaround. I`m uploading a capx with 3 tests. Only the test without any functions works as expected.

    Attach a Capx

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

    Description of Capx

    The capx has 3 tests where a "Card" object and a "CardImage" object are created on start of layout. CardImage stores inside itself the UID of the Card created. After that, the scale of both Card and CardImage are changed to 0.1. Test1 has two functions (SpawnCard and SetScale), Test2 has one function (SetScale) and the card is spawned "hard-coded" inside an On Start of Layout event. The Test3 is made without any function (So it does not support parameters without ugly go horse workarounds) but it works by successfully picking the right CardImage and resizing it. I`m not using containers for this because what I need is more complex and containers are too limited to this (Because they can only allow one instance of each object per Container Group)

    Steps to Reproduce Bug

    • Run the tests inside the capx

    Observed Result

    What happens?

    When using functions, events do not recognize the value of instance variables and fail to pick objects to change their scale. The SetScale functions just works correctly one frame after the objects Card and CardImage were created

    Expected Result

    What do you expect to happen?

    To work just like the Test3 without functions

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (NOT TESTED)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    Construct 2 r244 64bits

  • Awesome plugin, very powerful.

    Just an observation: The expressions "RGBA At" (When called multiple times in the same frame update) causes a considerable impact on performance when playing the game with Firefox.

    Google Chrome seems to handle the same events pretty well.

    Thanks for sharing this, I love it!

vicplay's avatar

vicplay

Member since 24 Apr, 2013

None one is following vicplay yet!

Trophy Case

  • 12-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies