Advertisement
MjnMixael

Untitled

Dec 11th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #Conditional Hooks
  2. $Application: FS2_Open
  3. $State: GS_STATE_GAME_PLAY
  4. $On Frame: [
  5. --tweakables!
  6. posX,posY = 10,50
  7.  
  8. --print stuffs
  9. function print_vars()
  10. if printSexpVars then
  11. gr.drawString("Sexp Var Name: Value, Type, Persistence", posX, posY )
  12. for i=1, #mn.SEXPVariables do
  13. local var = mn.SEXPVariables[i]
  14. if var:isValid() then
  15. gr.drawString( tostring(var)..": "..tostring(var.Value)..", "..tostring(var.Type)..", "..tostring(var.Persistence) )
  16. end
  17. end
  18. end
  19. end
  20. ]
  21.  
  22. $Application: FS2_Open
  23. $On Gameplay Start: [
  24. printSexpVars = false
  25. ]
  26.  
  27. $State: GS_STATE_GAME_PLAY
  28. $On Key Pressed:
  29. [
  30. if hv.Key == "Alt-2" then
  31. if printSexpVars then
  32. printSexpVars = false
  33. print_vars()
  34. elseif not printSexpVars then
  35. printSexpVars = true
  36. print_vars()
  37. end
  38. end
  39. ]
  40.  
  41. #end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement