Copy Scene = lots of invalid paths
thumbfrenzylabz
Member, PRO Posts: 50
Help with this one guys... its more of a headache than anything because ultimately I COULD just REPROGRAM every single invalid path every time I copy a scene to make a new level..but when I'm planning 60+ levels..that is a lot of reprogramming of something that should already just work.
So here's the issue.
I created level 1 of my game.. YAY!
I copied Level 1 Scene and renamed it to Level 2 Scene
I noticed a lot of the rules and stuff now have "invalid path".
For example:
An instance of "snow surface" has:
Change Attribute: Set self.offsetX to self.position.x - invalid path
Invalid Path should have copied over just fine from the previous scene to be:
scene.collision surfaces.rock ledge.position.x
Maybe it is trying to still reference to scene 1 when it should automatically reference to the current scene (in this case scene 2).
I dunno... But it sure would save me the tedious task and countless hours of re entering each of the attributes if someone knows a way to fix this.
Thanks!
So here's the issue.
I created level 1 of my game.. YAY!
I copied Level 1 Scene and renamed it to Level 2 Scene
I noticed a lot of the rules and stuff now have "invalid path".
For example:
An instance of "snow surface" has:
Change Attribute: Set self.offsetX to self.position.x - invalid path
Invalid Path should have copied over just fine from the previous scene to be:
scene.collision surfaces.rock ledge.position.x
Maybe it is trying to still reference to scene 1 when it should automatically reference to the current scene (in this case scene 2).
I dunno... But it sure would save me the tedious task and countless hours of re entering each of the attributes if someone knows a way to fix this.
Thanks!
Comments
It is simply that I created level 1 scene.. copied and renamed to level 2 scene and now a lot of stuff in the expression editor says "invalid path" in the copied version (level 2) of the scene.
This is causing a lot of work to reprogram every single invalid path because I have to switch back to scene 1 to see what it was supposed to be referencing to and then switch back to scene 2 and edit it... and HOPEFULLY I don't miss an invalid path somewhere in my code...
And on top of that, I'll have to do this for EVERY single new level in my game... this can't be right....
@beefy_clyro This is using Windows version. Having a look through to see which actors have invalid paths, it appears to be only (so far I haven't found a counter example) in actors that are instanced and referencing to other actors in the scene.
For example. I have an actor that needs to have its X, Y position constrained to a rock that the player can move around by dragging. In order to be able to constrain it to the rock's position then this actor needs to be instanced to have access to the scene attributes. I COULD make a global/game variable and just keep it updated with the rock's X, Y position and use that in a prototype..but that seems like a workaround and would cause hassles because what if I wanted to have 2 rocks..3....10...100...
@FallacyStudios Yes, the actors are accessing scene attributes. For example:
Constrain Attribute: actor.position.x to scene.collision surfaces.rock ledge.position.x
However, when I copy and paste the scene... it is instead:
Constrain Attribute: actor.position.x to invalid path.
Thanks guys!
I am downloading the latest version anyway. 0.10.30....oops, nevermind that was the Mac version. The Windows version available for download is 0.10.00, which is what I have installed already...so I do have the latest version.
Maybe I should try to make a small dummy-project with an instanced actor and references to other actors in the scene and then copy the scene to see if I can replicate the problem.
Actor 1 = rock
Actor 2 = thumb
I instanced thumb so that it can reference the X, Y position of rock and I added the following 2 constraints to the instance of thumb.
constrain attribute self.position.x to scene.background.rock.position.x
constrain attribute self.position.y to scene.background.rock.position.y
I tested it and it worked.
I copied the scene and pasted it.
The constrain attributes in the copied scene were now
constrain attribute self.position.x to invalid path
constrain attribute self.position.y to invalid path
I also tried alt+drag drop to copy the scene... still same problem.... This is a bug or am I doing something wrong? This is going to cause a lot of work for me if this is a bug...
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Option 1) Bite the bullet and reprogram all the "invalid paths" manually. Each new level will have several invalid paths that I will have to do over and over...
Option 2) Try exporting, opening it on my mac.. copy+paste the scene and hope that no "invalid paths" appear. Then resave it.. and open it back up in Windows GameSalad to continue working. I prefer using my PC (so sue me!) to do work.
Option 3) Use game variables.... eww... tacky.. workaroundish... and I already kinda tried it in a dummy project and it didn't work very well... I could try other ways, but I don't like the idea of using tons of game variables to store locations of actors.
Option 4) Wait for someone to post a solution... the silver bullet that "if you just do this then you will no longer have this problem"...
I've been doing Option 4 for the past day..... meanwhile my project is on hold... None of the other options look to appealing, but ...... *sigh*
Not that this helps your current situation though
I have tried option 2 today ... open project in mac... copy scene....save... transfer back to PC...open it up.... it worked...no more invalid paths.
So, every time I need to make a new level, I go copy the scene on my mac.... not the most convenient solution but I guess that's what I've got to do...
Windows creator bug = coping scenes makes references to scene variables = invalid path.