UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

problems getting script_model to move

broken avatar :(
Created 12 years ago
by buttkicker845
0 Members and 1 Guest are viewing this topic.
1,176 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
so im making a trap that needs a script_model to move when the trigger is activated and return to the original location after the trap is finished. but when i give it the kvps that im using in the script it doesnt move. it works with a script_brushmodel just not a script_model.

this is my code for the movement portion:
Code Snippet
Plaintext
trap_think(trig){
   turn_handle_down();
   play_fx();   
   water = getEnt("floodwater","targetname");
   center = getEnt("floodzone", "targetname");
   start = water GetOrigin();
   for(i=0;i<trig.size;i++){
      trig setHintString("Water Tower Tank Emptying");
   }//end for loop
   water moveto(center.origin,10,0.25,0.1);
   wait 1;
   thread damage();
   center playsound("human_crunch");
   wait self.time;
   water moveto(start,10,0.25,0.1);
   for(k=0;k<trig.size;k++){
      trig[k] setHintString("Water Tower is refilling tank...");
   }//end for loop
   wait self.cooldown;
   turn_handle_up();
   for(i=0;i<trig.size;i++){
      trig setHintString("Start Flood! ["+self.cost+"]");
   }//end for loop
}//end trap_think method

 
Loading ...