Author: Not specified Language: lua
Description: Not specified Timestamp: 2013-06-10 14:00:29 +0000
View raw paste Reply
  1. group { name: "e/comp/effects/auto/grow";
  2.    inherit: "e/comp/effects/auto/pane";
  3.    //data.item: "noclip" "1"; //setting this prevents object from being clipped to its zone during effect
  4.    script {
  5.       public message(Msg_Type:type, id, ...) {
  6.          if ((type == MSG_INT_SET) && (id == 0)) {
  7.             /* set state */
  8.             new st;
  9.  
  10.             st = getarg(2);
  11.             if (st == 1)
  12.               set_state(PART:"mover", "custom", 0.0);
  13.             else
  14.               set_state(PART:"mover", "default", 0.0);
  15.          } else if ((type == MSG_INT_SET) && (id == 1)) {
  16.             /* border geom[4] / screen size[2] / desk change direction[2] */
  17.             new dx, dy;
  18.             new Float:r1x = 0.0, Float:r1y = 0.0, Float:r2x = 1.0, Float:r2y = 1.0;
  19.  
  20.             dx = getarg(8);
  21.             dy = getarg(9);
  22.  
  23.             custom_state(PART:"mover", "default", 0.0);
  24.             if (dx == 1) r1x = 1.0;
  25.             else if (dx == -1) r2x = 0.0;
  26.             if (dy == 1) r1y = 1.0;
  27.             else if (dy == -1) r2y = 0.0;
  28.             set_state_val(PART:"mover", STATE_REL1, r1x, r1y);
  29.             set_state_val(PART:"mover", STATE_REL2, r2x, r2y);
  30.          }
  31.       }
  32.    }
  33. }
View raw paste Reply