Here is the situation. Two scenes: (1) Start Menu (2) First game scene.
From the start menu there is a button: New Game that calls an Action List to do:
In the first Game scene, onLoad has an action list that checks for this global variable and if it is true it runs an action list, lets call it "introduction cutscene".
The game has two player characters.
Here comes the problems.
Cases:
Apart from the fact that maybe there are scenes in memory in contrast with the case that I just run the scene (maybe the "this scene" options mess up in the actions), in the menu scene, as the player are created, I had to create a off-screen platform where I just let them be there.
Any light is very appreciated.
Thanks in advance!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I'll need more details on how to recreate these issues.
What are your AC and Unity versions?
If a scene is opened through "natural gameplay", i.e. use of the Scene: Switch Action as opposed to loading a save file, then the scene's OnStart cutscene is run - not OnLoad. OnStart should be used to run a scene's introduction cutscene.
If you have two players, then you'll only have one inactive Player - use the Player: Teleport inactive Action to move the inactive Player only. Though, if you're referring to their game-starting position, this can be set in the Player's "Start data" window in the Settings Manager.
If you can provide steps on how to reproduce the issue, please share and I will attempt a recreation.
What happends instead - does the Action not run, or hang indefinitely? Is this in a gameplay-blocking ActionList, with Wait until finish? checked in the Action?
Enable the AC Status window from the bottom of the Settings Manager - that should report which Player is active, and what ActionList(s) are currently running. Does the report match up with what's expected?
Can you share the message as it appears in full, stacktrace included?
Indeed. I just did not know what to send to help
I will not reply in the same order, as I could make it work, but I left you some notes in case you want to use them for future improvements.
It did not move, and yes, wait until finish was on. A warning here saying: "movements have been disabled, please check your engine settings" would help a lot.
What you said: "Enable the AC Status window from the bottom of the Settings Manager" gave me the hint as I said Movements were disabled. This was because in the Menu screen I did have to disable the menus that appears by default in the game screen and I did also disable movements to avoid my players in the offscreen platform moving to somewhere.
Two things here:
1. I suggest to change "Teleport inactive" to "Teleport inactive player". I wondered what in the hell the inactive word was doing there, but never past by my mind the idea of inactive player.
2. I could not find Player's "Start data" window in the Settings Manager. And I miss something like that because the natural way for me would be able to specify the start position for each player separately rather than use a list action on each screen to say where the second player goes. I am using the latest version of AC, is there any screenshot where I can find that window?
I find this pretty confusing. I have read several replies of yours in the forum to catch the idea, but now I know why it is confusing. In unity similar events are being used with different semantics. Instead of OnLoad, something like OnRestoredGame would give much better idea. Same from OnStart. I would suggest something like OnSwitched, AfterSwitchAction, OnAppear, OnFocus... but I guess it is hard to make this kind of change now.
I do not see the use case where something that is loaded from a file will not want to execute the "OnStart" actionlist, as I think there may be things that you want to do in both cases. But anyway, I took notes and I will write the logic according to that.
Thanks for all your help as always,
David
A fair suggestion, thanks.
A text tutorial and video on Player-switching can be found here.
If you haven't seen it already, an alternative to the OnStart / OnLoad cutscene fields is to use the ActionList Starter component.
This component serves as a replacement that can be used to trigger a given ActionList when the scene starts, is loaded, or both. If Player-switching is enabled, you can also specify whether it the scene is loaded due to switching Player character.
For more details, see the Manual's "ActionList starter" chapter.