Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Conditional Hooks
- $Application: FS2_Open
- $State: GS_STATE_GAME_PLAY
- $On Frame:
- [
- --print stuffs
- if printSexpVars then
- gr.drawString("Sexp Var Name: Value, Type, Persistence", posX, posY )
- for i=1, #mn.SEXPVariables do
- local var = mn.SEXPVariables[i]
- if var:isValid() then
- gr.drawString( tostring(var)..": "..tostring(var.Value)..", "..getSexpstates(tostring(var.Type))..", "..getSexpstates(tostring(var.Persistence)) )
- end
- end
- end
- ]
- $Application: FS2_Open
- $On Gameplay Start:
- [
- --tweakables!
- posX,posY = 10,50
- printSexpVars = false
- sexpstates = {}
- sexpstates["SEXPVAR_CAMPAIGN_PERSISTENT"] = "CP"
- sexpstates["SEXPVAR_NOT_PERSISTENT"] = "NP"
- sexpstates["SEXPVAR_PLAYER_PERSISTENT"] = "PP"
- sexpstates["SEXPVAR_TYPE_NUMBER"] = "number"
- sexpstates["SEXPVAR_TYPE_STRING"] = "string"
- function getSexpstates(state)
- if sexpstates[state] then
- return sexpstates[state]
- else
- return state
- end
- end
- ]
- $State: GS_STATE_GAME_PLAY
- $On Key Pressed:
- [
- if hv.Key == "Alt-2" then
- if printSexpVars then
- printSexpVars = false
- elseif not printSexpVars then
- printSexpVars = true
- end
- end
- ]
- #end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement