Disable any actions that are changing scroll Y.
There were a few mistakes in the code, here is the fixed version
dropbox.com/scl/fi/prmccc8ug38lfr1ryjl26/V6_.c3p
No, r should be a global or a local variable, not instance variable.
You probably need to do the same with the Random function - pick Respawn instance by UID.
I don't really understand why you need those functions. You can spawn new monster directly in event #1
Then setting a random value to a variable should definitely work.
On start of layout: Set r to random(sprite.animationFrameCount) Sprite set frame to r
Or maybe try spending more than 5 minutes looking for a solution before giving up :)
You probably need to make a bigger layout. Or change the expressions.
In NWjs export you can change window title with NW.js object.
In a web game this may be possible with scripting.
document.title = "This is the new page title.";
Develop games in your browser. Powerful, performant & highly capable.
Can you explain the task?
Do you need to set one random frame to all instances? (say, frame 4 for all)
Or random frames to each instance, without repetition?
You can add both objects to a family.
Or just modify event #4:
set minX to min(player1.x, player2.x)
set minY to min(player1.y, player2.y)
etc.
Obviously you won't need the "for each" loop since you only have one instance of each object.
You need to pick the right spawner instance inside the function. Add another function parameter - SpawnerUID. Pass Respawn.UID when calling the function. Inside the function use "Respawn Pick by unique ID" condition.
Or you can set "Copy picked" in function properties, then they should inherit the picked scope.
You want the frame to be the same for all instances? Then assign it to a variable:
set r to random(sprite.animationFrameCount)
Sprite set frame to r
Member since 26 May, 2016