Author |
Message |
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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
|
Tue May 19, 2009 2:27 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
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.
|
Tue May 19, 2009 3:14 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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.
|
Tue May 19, 2009 3:18 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
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.
|
Tue May 19, 2009 3:23 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: bunker building mode upon a certain input
Is it possible to reset the count for "done"?
|
Tue May 19, 2009 3:25 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: bunker building mode upon a certain input
Not that I know of. I'll check it with data some time.
|
Tue May 19, 2009 3:40 am |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
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.
|
Tue May 19, 2009 3:42 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: bunker building mode upon a certain input
|
Tue May 19, 2009 3:44 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: bunker building mode upon a certain input
I see nothing about activities.
|
Tue May 19, 2009 6:51 am |
|
|
Daman
Joined: Fri Jan 26, 2007 3:22 am Posts: 1451
|
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.
|
Tue May 19, 2009 1:49 pm |
|
|
|