Data Realms Fan Forums http://45.55.195.193/ |
|
bunker building mode upon a certain input http://45.55.195.193/viewtopic.php?f=73&t=14773 |
Page 1 of 1 |
Author: | whitty [ Tue May 19, 2009 2:27 am ] |
Post subject: | bunker building mode upon a certain input |
When you press "B" while controlling an actor, you're supposed to enter bunker building mode. But nothing happens. And nothing prints to the console. How wrong is this? Code: function Update(self) if(UInputMan:KeyHeld(2)) and (self:IsPlayerControlled()) then Holding = 1 else Holding = 0 end if Holding == 1 then ActivityMan:GetActivity().ActivityState = Activity.EDITING else Held = nil; end end |
Author: | TheLastBanana [ Tue May 19, 2009 3:14 am ] |
Post subject: | Re: bunker building mode upon a certain input |
Setting the game back to bunker build mode doesn't work once you've pressed done before. |
Author: | whitty [ Tue May 19, 2009 3:18 am ] |
Post subject: | Re: bunker building mode upon a certain input |
If I just press "b", it acts as if you have pressed "done". If I press and hold "b", it goes into and stays in the bunker editor. But it's slightly laggy. |
Author: | TheLastBanana [ Tue May 19, 2009 3:23 am ] |
Post subject: | Re: bunker building mode upon a certain input |
That's because the game is starting the bunker build stage and then exiting it in rapid succession. If you try this on a level that starts without the bunker build stage (e.g. the brain is placed ahead of time), it will work once. Obviously there is a variable that dictates whether the "Done" button has been pressed that is not reset until the game restarts. |
Author: | whitty [ Tue May 19, 2009 3:25 am ] |
Post subject: | Re: bunker building mode upon a certain input |
Is it possible to reset the count for "done"? |
Author: | TheLastBanana [ Tue May 19, 2009 3:40 am ] |
Post subject: | Re: bunker building mode upon a certain input |
Not that I know of. I'll check it with data some time. |
Author: | whitty [ Tue May 19, 2009 3:42 am ] |
Post subject: | Re: bunker building mode upon a certain input |
Cool, thanks. I guess for now I just have to deal with holding down a button and getting some lag. Also, I checked everything on the Wiki for Lua, and most of it is empty. I think that should be a priority on the to-do list. |
Author: | TheLastBanana [ Tue May 19, 2009 3:44 am ] |
Post subject: | Re: bunker building mode upon a certain input |
http://www.datarealms.com/wiki/index.php/LuaDocs/Index Probably should be closer to the front page, though. |
Author: | mail2345 [ Tue May 19, 2009 6:51 am ] |
Post subject: | Re: bunker building mode upon a certain input |
I see nothing about activities. |
Author: | Daman [ Tue May 19, 2009 1:49 pm ] |
Post subject: | Re: bunker building mode upon a certain input |
whitty wrote: Cool, thanks. I guess for now I just have to deal with holding down a button and getting some lag. Also, I checked everything on the Wiki for Lua, and most of it is empty. I think that should be a priority on the to-do list. It needs to be transferred from Data's documentation, the description cleaned up, datatypes of arguments added, and an example added. For each function. Data apparently didn't Document the activity or UInputMan objects. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |