I have it all set up but my bounce or brush does not swing around its origion please help here is my script
Code: Select all
main()
{
thread self_closing_doors();
}
self_closing_doors()
{
doors = getentarray("bounce_trig","targetname");
for(i=0; i<doors.size; i++)
{
doors[i] thread door_think();
}
}
door_think()
{
self.doormoving = true;
self.doormodel = getent(self.target, "targetname");
while(1)
{
self waittill("trigger");
if(!self.doormoving)
{
self thread door_move();
}
}
}
door_move()
{
self maps\mp\_utility::triggerOff();
self.doormoving = true;
self.doormodel rotateyaw(self.count, 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
wait (60);
self.doormodel rotateyaw((self.count * -1), 2, 0.5, 0.5);
self.doormodel waittill("rotatedone");
self maps\mp\_utility::triggerOn();
self.doormoving = false;
}
My script is called _bounce_trig.cfg.
My trigger is calledbounce_trig.
My triggers target is auto1.
My triggers count is 90 just to test the swing.
My origion and brush are called auto1.
My origion and brush are connected by script_brushmodel.
My brush and trigger are connected by w [weld blue line].