As a workaround you can add an empty animation at the top and then move the subfolder below it.
This is definitely a flaw in UI design, I suggest filing a bug report about it.
I'm presuming that when this app is running on the server it will save to a folder on my server, is that correct?
No, unfortunately not. If you need to upload changed JSON from the app to your server, you need to send JSON data to a special PHP script which will save it as a file. See comments in this post:
construct.net/en/forum/construct-2/how-do-i-18/savecsv-file-server-137535
I meant the origin points in sprites, not the grid offset.
Develop games in your browser. Powerful, performant & highly capable.
For this task it's much easier when origin points are set at [0,0]. Here is the fixed project:
dropbox.com/s/1e1mg705fx94xp8/align.c3p
Try this:
But it's not a good idea to use Pin with Physics objects and to change their angle. This may cause problems if this sprite collides with other physics objects..
If the data doesn't change, you can upload it as a text file. Here is an example:
dropbox.com/s/z8uno909mhefmvx/LoadJSON.capx
I believe it's runtime.objects["objectname"].getFirstInstance()
Or you can add all objects into a family and pick Family instance by evaluating Family.ObjectTypeName="objectname" using "System pick by evaluate" condition
You can access variables and objects by string name using scripting.
When text changes in the text box, you can compare it with the previous text and figure out what key was pressed. But it may be tricky for Del/Backspace keys or when a character is added in the middle of the string.
Another option is to make your own text input box.
howtoconstructdemos.com/old-terminal-style-text-input-with-blinking-cursor-capx
When cursor is in the Text Input, you can only detect Enter and Escape keyboard events.
If you need to make the screen white for a fraction of a second, you can add a non-transparent layer above all other layers. Set it invisible by default. When player dies, set layer visible, wait 0.1s, set layer invisible.
That should work. Please show your event sheet.
I don't know how to turn the torch off. Try the same code but with {torch: false} at the end.
I tried this script in "On button pressed" and it works on mobile.
//Test browser support const SUPPORTS_MEDIA_DEVICES = 'mediaDevices' in navigator; if (SUPPORTS_MEDIA_DEVICES) { //Get the environment camera (usually the second one) navigator.mediaDevices.enumerateDevices().then(devices => { const cameras = devices.filter((device) => device.kind === 'videoinput'); if (cameras.length === 0) { throw 'No camera found on this device.'; } const camera = cameras[cameras.length - 1]; // Create stream and get video track navigator.mediaDevices.getUserMedia({ video: { deviceId: camera.deviceId, facingMode: ['user', 'environment'], height: {ideal: 1080}, width: {ideal: 1920} } }).then(stream => { const track = stream.getVideoTracks()[0]; //Create image capture object and get camera capabilities const imageCapture = new ImageCapture(track) const photoCapabilities = imageCapture.getPhotoCapabilities().then(() => { //todo: check if camera has a torch //let there be light! track.applyConstraints({ advanced: [{torch: true}] }); }); }); }); //The light will be on as long the track exists }
I guess it should work in C2 too, if you run it using Browser Execute Javascript action.