B Tutorial Module System Fast script test

Users who are viewing this thread

Cjkjvfnby

Regular
May be it will be useful for new members:

Fast way to test changes in script:

Prerquarements:

Run game in debug mode.
Switch for window (Alt+Enter)

Update module scripts with:
Code:
if __name__ == '__main__':
  print "Start"
  import process_scripts
  print "Finished"

Testting:

Change module scripts (for example add display_message to entering location.)
run module_scripts.py in python (F5 for IDLE, ctrl+B in Sublime Text 2) Only scripts file will be builded.
In window click  View (alt +v) - Restore Module Data (scripts will be reloaded) Message "Module data reloaded shown"

And trigger you script via game. (Enter location.)
 
I don't really understand this... Could somebody elaborate it a bit to me?

What's Alt+Enter and is this so that you don't need to build all module files but only module_scripts?
 
Back
Top Bottom