Advertisement
ZoriaRPG

GlobalSlotScriptTest.z

Jun 19th, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. import "std.zh"
  2.  
  3.  
  4. int a;
  5. int b;
  6. int c;
  7.  
  8. global script Init{
  9.     void run(){
  10.         a = 1;
  11.     }
  12. }
  13.  
  14. global script OnContinue{
  15.     void run(){
  16.         a++;
  17.         b++;
  18.     }
  19. }
  20.  
  21.  
  22. global script OnExit{
  23.     void run(){
  24.         a--;
  25.         c++;
  26.     }
  27. }
  28.  
  29. global script active{
  30.     void run(){
  31.         ClearTrace();
  32.         TraceNL();
  33.         while(true){
  34.             if ( Game->KeyPress[KEY_I] ) {
  35.                 TraceS("Init Var a: "); Trace(a);
  36.                 TraceS("OnContinue var b: "); Trace(b);
  37.                 TraceS("OnExit var c: "); Trace(c);
  38.             }
  39.             Waitdraw(); Waitframe();   
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement