DiegoM's Forum Posts

  • The problem is that once the tween is finished, it doesn't exist anymore.

    After it has completed if you continue to query it's value on every tick, the expression just returns 0, because it can't find the tween.

    Try setting up a trigger that waits for the tween to complete and then saves the ending value in a variable, and you can use that after the tween is over.

    Or maybe check for the tween to be playing before trying to use the value.

  • If you can share a minimal project showing what the problem is, you will get help very quickly.

    If you can't do that, the next best thing is sharing the project you are working on. That isn't ideal though, because the project might be very complex making it more difficult to find what the problem is, but it's still better than no project.

  • Look into the Drawing Canvas plugin. You can use it as a blank surface onto which you can perform drawing commands.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

  • The genre of this kind of games is called "Launcher".

    If you search for "Launcher games" you will find some. They used to be popular back in the hey day of Flash, but not so much now a days.

  • This is the documentation for the library you are using.

    plotly.com/javascript/plotlyjs-function-reference

    From giving it a quick look there is a method called Plotly.react that is meant for updating graphs after creating them.

    I think that is what you need.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I checked with Ashley about this and it is the intended behaviour.

    When a function is called, picked instances are reset in the body of the function. If you need to rely on picking inside of a function you need to pass the UID of the instance you want as an argument, and inside of it use it to pick the instance you need.

  • I am going to go on limb here and try to help.

    It's a little bit hard to follow what is going on, but I think what is happening is that the function NPCInteraction2 is not doing what you expect.

    Inside of it you are checking for an NPCID property of the NPCINTERACT family but the check is not against the instance of the family that was picked when the function was called. I will check with Ashley why is that, I have a feeling that is the expected behaviour, but I will ask him to be sure.

    So what ends up happening is that all that state for showing a dialogue is being set on the wrong instance.

    To get around that, I passed the UID of the picked instance in the call to NPCInteraction2 and inside of it I added an extra condition to Pick by comparison in addition to the NPCID condition. That way you can be sure that state is set in the correct instance.

    Something similar then happens in the call to FormatDialogue, so to get around that I added a few arguments.

    In the calls to DialogueLine, FormatDialogue and PickAnswer I pass in an additional argument with the IID of NPCINTERACT family. I did that so that I would be able to use that value in FormatDialogue to use the expressions NPCINTERACT(IID).itemname and NPCINTERACT(IID).interactname and ensure the function is using the correct instance values every time.

    NOTE that UID and IID are different things.

    All of this is quite hard to explain, but I think I covered everything.

  • A 401 error code means that you don't have authorization to that resource. It is possible that the request is working in the browser because you are logged in to Youtube with your account.

    I think that you need to generate some OAuth 2.0 authorization credentials to use that API.

    developers.google.com/youtube/v3/live/registering_an_application

    Can't really help you more, but I would look into that.

  • It is on my radar, unfortunately other things have gotten on the way and I don't know when I will be able to get back to this feature. I haven't forgotten about it it.

  • Arbitrary means that the action picks one of the pre existing instances setup in the editor and uses it's properties to create the new instance, and you don't get to pick which one. So no it is not a replica.

    In that case, if the runtime so happens to pick an instance that was setup to be a template, then it will seem that the action created an instance based on it, but in reality it happened by chance.

    In the example if you use an empty string or a string that doesn't match to any template, the runtime still needs to use one of the existing instances as a source, and it is picking the one defined as a template, because it also happens to be the first in the layout. That is not a behaviour you should rely upon as it is an implementation detail of Construct and could change at any point.

    The only way to guarantee which instance is used as a template when creating new instances is to provide a name of an existing template.

  • UltraLion

    The screenshots are from an earlier implementation, it was later changed to accepted a string rather than the fixed drop down to make it more flexible at runtime.

    If nothing, or a template name that doesn't exist, is specified, the Create Object action will just create an arbitrary instance.

  • This is a regression introduced somewhere along the current beta cycle.

  • If you place a variable defined in a JS script in the global scope it will be available in all other scripts.

    You can do that by writing something like this.

    	let myLocalVariable = 100;
    	
    	// This places the local variable above, into the global scope
    	globalThis.myGlobalVariable = myLocalVariable;
    

    You can try it out very quickly by running a script similar to that one on start of layout, then try adding a different script that runs, let's say, on a mouse click and check if the variable exists in globalThis.

  • Not really sure how everything in your project works, but you can try checking the layer in which a given note is before deciding whether it was hit or not.

    You can do that using the system condition Layer is visible and using the LayerName expression as the argument. You would need to make sure the correct noted is picked of course, so LayerName has the correct value.

  • It's always better to report any issues in the tracker. That way even if I forget about it because I am busy with something else, I will pick it up later when I get the chance.

    I think someone mentioned the problem about reaching the last frame/animation using the arrow keys when the shortcut was first implemented... I have clearly forgotten about it until now.