DiegoM's Forum Posts

  • 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.

  • This is one way of cycling through lines of text defined in an array.

    dropbox.com/s/nepxo6gicsdbegn/CycleTextFromFile.c3p

    The good thing of doing something like this, is that you don't need to modify the event sheet if you later decide you want to add more lines of dialog.

    Even if you aren't familiar with the AJAX or Array plugins, the example is short enough to be able to go through the events one by one. The important bits are commented.

    Of course this is just one way of doing it, it's the kind of thing that 10 different people would give you 10 different answers.

  • Contact support.

    supportssz@construct.net

  • It's cool, it was a rather old and subtle issue. I guess that people encountering it either could never reproduce it or just thought they were doing something wrong because it's hard to make it happen twice in a row if you don't know it is there.

  • Are you seeing this problem in the latest beta?

    An issue very similar to what you describe was reported and fixed on r289.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I took a quick look. You were just misusing the Wait action.

    Here is something more like what I think you want.

    dropbox.com/s/3i129jqgxbnbeia/Zeltronics%20VOZ%20%281%29.c3p

    Check out the part using the Every X seconds action. I also added a little change to the main layout so the game could start without going through the intro, so be careful if you just copy and paste stuff.

    Here is a short tutorial explaining the Wait action better.

    construct.net/en/tutorials/system-wait-action-63

  • I think what is happening is that you are calling the Spawn action on a Sprite instance, expecting for a single Sprite to take the action.

    What is likely happening though, is that all the sprites picked in the corresponding condition are doing the Spawn action.

    You need to make sure you only pick the instances you need. That depends on what you are doing.