wardtf Posted January 31, 2015 Posted January 31, 2015 So I want the game to pause (and specifically FPSplayer.pfb) when self.currentState == "menu" or "splash" So I want the moving gun animation to stop, I want it to ignore key presses and mouse movement, I want it to ignore mouse clicks. Basically, I want it to freeze up when app.currentState is not "game" Any ideas? Quote : : i7 4700mq : : GT 745m : : 8GB : : Steam : :
Rick Posted January 31, 2015 Posted January 31, 2015 In App.lua try only calling the following when not paused. if self.paused == false then --Update the world self.world:Update() end Now you can pause and unpause with the self.paused variable and setting it to true. Define that variable as false in App:Start(). Note that this would stop ALL entity scripts so your paused code can't be inside entity scripts but would need to be in App.lua. Quote
wardtf Posted February 1, 2015 Author Posted February 1, 2015 Note that this would stop ALL entity scripts so your paused code can't be inside entity scripts but would need to be in App.lua. So would this prevent a 'menu chamber' with moving lights from rendering? Quote : : i7 4700mq : : GT 745m : : 8GB : : Steam : :
Rick Posted February 1, 2015 Posted February 1, 2015 Yes, most likely as you probably have that in an entity script in that 1 world and that would no longer be getting called. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.