View unanswered posts | View active topics It is currently Wed Dec 25, 2024 5:20 pm



Reply to topic  [ 3 posts ] 
 going back to edit mode 
Author Message

Joined: Tue Jan 07, 2014 10:29 am
Posts: 8
Reply with quote
Post going back to edit mode
going back to edit mode, will this do?

Code:
function SandboxMission:UpdateActivity()
   if(UInputMan:KeyReleased(string.byte("v")) and self.ActivityState != Activity.EDITING) then
      self.ActivityState = Activity.EDITING
   end
end

it gives me an error in the activity file


Sun Mar 09, 2014 1:53 pm
Profile

Joined: Fri Nov 23, 2012 5:42 am
Posts: 143
Reply with quote
Post Re: going back to edit mode
This should really be in the lua editing forum, but ok. You need to use ~= instead of !=. I'm also not sure if string.byte works properly like you've used it, so if the ~= doesn't fix the problem, try changing the string.byte to the numerical key for v.


Sun Mar 09, 2014 6:39 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: going back to edit mode
What is the error that it gives you?


Sun Mar 09, 2014 9:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.037s | 15 Queries | GZIP : Off ]