Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Tropical Cyborg on April 30, 2013, 03:45:18 PM

Title: All scripts stop after reloading levels
Post by: Tropical Cyborg on April 30, 2013, 03:45:18 PM
During the 1st time I run the game, all the scripts are working fine. But when the game is over and I reload the 1st level again, all scripts stops working. Any ideia of why this is happening?

Thanks
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on April 30, 2013, 03:52:46 PM
Actually, not all the scripts but basically the Fade in actions.
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on April 30, 2013, 04:28:18 PM
iTween actions stops after the level is reloaded.
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on April 30, 2013, 05:23:49 PM
Problem solved. Just checked the RealTime checkbox on the actions to true. Not sure why but it solved the issues.
Title: Re: All scripts stop after reloading levels
Post by: Pawel on April 30, 2013, 11:38:11 PM
Problem solved. Just checked the RealTime checkbox on the actions to true. Not sure why but it solved the issues.

I have similar problem after reloading with "Smooth Look At" action. After reloading the character that is controlled by this action faces different direction then the target that is specified. In fact it is running sideways. In this case there is no RealTime option to chose.

I've also notices other strange behaviors that happen after reloading the level. Is there a way to load the level as it were running for the first time, rather the re-loading? I mean purging the memory and re-initializing? Those kinds of bugs take days to find a workaround...
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on May 01, 2013, 09:43:03 AM
I've solved the iTween Issue and found another one with a Send Message action. Also when the game reloads, it doesn't work anymore. If you find any solution to your issue, please share here.
Title: Re: All scripts stop after reloading levels
Post by: Pawel on May 01, 2013, 09:56:33 AM
I've seen some similar bug reporting messages on Unity website. I wonder if this is not something that is caused by the Unity rather then Playmaker. Either way it needs to be solved since this is a huge issue...

http://forum.unity3d.com/threads/178490-Reload-level-bug

It would be nice to have a Purge Memory Action when reloading levels as an option in case this sort of thing happens...
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on May 01, 2013, 10:15:19 AM
The curious thing about this issue is that on my game I am calling the Send Message action in two different ways. On some levels it is called using a NGUI button with a JavaScript and it works fine even when the game is reloaded but on the levels it is called from other FSMs when the game is reloaded, they stop working.
Title: Re: All scripts stop after reloading levels
Post by: Pawel on May 01, 2013, 10:18:03 AM
Same thing here. I have two characters controlled via Move Towards and Smooth Look at actions. One of them works fine... Go figure!
Title: Re: All scripts stop after reloading levels
Post by: Pawel on May 01, 2013, 10:23:23 AM
Although I should not insist that the other character works fine -- Every now an then some of the animations, loading of which relies on the speed of the character that is reported to them, no longer load while the character moves. The character goes to "Idle" animation instead of "Run"... This does not happen all the time, so it is even harder to find the cause.
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on May 01, 2013, 10:45:45 AM
Actually it is a Send Event and not a Send Message action.
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on May 01, 2013, 11:15:53 AM
Problem solved. I've just changed the Send Event actions to Send Event ByName actions and it is working fine now.
Title: Re: All scripts stop after reloading levels
Post by: Alex Chouls on May 01, 2013, 12:22:58 PM
There's something else going on here. You shouldn't have to do that...

Can you send me a project in a broken state? I.e., you press play and it shows the bug?

You could also try loading an empty scene, then your target scene to help Unity reset properly...
Title: Re: All scripts stop after reloading levels
Post by: Tropical Cyborg on May 01, 2013, 12:24:51 PM
Send to an email?
Title: Re: All scripts stop after reloading levels
Post by: Alex Chouls on May 01, 2013, 12:30:27 PM
Either use Playmaker/Tools/Submit Bug Report and you should get a link to a bug that you can attach a project to.

Or email to info@hutonggames.com with a link to this thread.

Thanks!