Data Realms Fan Forums
http://forums.datarealms.com/

going back to edit mode
http://forums.datarealms.com/viewtopic.php?f=73&t=45586
Page 1 of 1

Author:  Face [ Sun Mar 09, 2014 1:53 pm ]
Post subject:  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

Author:  clunatic [ Sun Mar 09, 2014 6:39 pm ]
Post subject:  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.

Author:  Duh102 [ Sun Mar 09, 2014 9:53 pm ]
Post subject:  Re: going back to edit mode

What is the error that it gives you?

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/