DiegoM's Forum Posts

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

    supportuvc@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.

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

  • It's difficult to tell exactly what is happening, but since you said you are using some javascript, is it possible that some of those snippets are using the await keyword?

    If that is the case, the javascript is asynchronous and needs to be waited for before continuing if you want to keep things running sequentially.

    construct.net/en/make-games/manuals/construct-3/scripting/using-scripting/scripts-in-event-sheets

  • I think the problem is that "On key release" is a trigger, you can tell by the little green arrow next to it.

    Triggers are only executed when they actually happen, in this case when the key is released. This is in contrast to regular conditions, like "Key is down", which are checked continually.

    In your case you can use an inverted "Key is down" event. This will continually check if the chosen key is NOT pressed. Then you can do what you need while the key is not pressed.

  • This is a rather simple example showing how you could organize the steps to start and complete a quest.

    dropbox.com/s/yp6skx37lr0uvky/SimpleQuestSystem.c3p

    There are comments for all the important parts, so hopefully you can use it as a building block for something bigger.

    Not too sure what the best way be to handle multiple quests on the same layout would be... I'll leave that to you :)