View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:15 am



Reply to topic  [ 10 posts ] 
 bunker building mode upon a certain input 
Author Message
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: bunker building mode upon a certain input
Is it possible to reset the count for "done"?


Tue May 19, 2009 3:25 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post 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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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.


Tue May 19, 2009 3:44 am
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: bunker building mode upon a certain input
I see nothing about activities.


Tue May 19, 2009 6:51 am
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.062s | 13 Queries | GZIP : Off ]