Advertisement
ZoriaRPG

GlobalSlotScriptTest250.z

Jun 19th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 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.         int sa[] = "Init Var a: ";
  34.         int sb[] = "OnContinue var b: ";
  35.         int sc[]= "OnExit var c: ";
  36.         while(true){
  37.             if ( Link->PressEx1 ) {
  38.                 TraceS(sa); Trace(a);
  39.                 TraceS(sb); Trace(b);
  40.                 TraceS(sc); Trace(c);
  41.             }
  42.             Waitdraw(); Waitframe();   
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement