Forum rules - please read before posting.

Engine: Change scene to the same level?

Has something changed in recent versions where you can't do this anymore?

I have some levels that are configured to behave very differently depending on the state of some global variable (basically I simulate the passage of time this way). So quite often I need to do:

Fade camera out
Change Day variable from Day 1 to Day 2
Engine: change level -> Same level

However I am experiencing an issue at the moment where the action list will get to the last action (the change scene) and then it won't do anything. 

Fairly certain that a) this used to work fine and b) I haven't actually done changed anything that would break this on my end

Comments

  • Hmm... ok, looking into the code a little bit I see that a forceReload parameter has been added to ChangeScene (SceneChanger.cs ln 124)

    That doesn't seem to be exposed to/controllable by the change scene action though so not sure how I could ever get my use case to work... Maybe there's a new way now to do what I was doing?

    In any case I've gone ahead and exposed that to the change scene action by adding a public bool forceReload to its parameters like this:

    image

    I was going to just pass true for forceReload to the call to ChangeScene at ln 113 in ActionScene.cs but I was worried that might be getting called with true in cases where it should be false so I thought I'd just expose it instead.

    In any case it fixes my issue although no idea if it's something you might actually want to take but there you go anyway :) 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.