Didn't work ='[megazor wrote:try this and tell us what it says
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 = false; self.doormodel = getent(self.target, "targetname"); if (isDefined(self.doormodel)) iprintln("model defined"); while(1) { self waittill("trigger"); if(!self.doormoving) self thread door_move(); } } door_move() { self maps\mp\_utility::triggerOff(); self.doormoving = true; if (isDefined(self.count)) iprintln("rotating"); self.doormodel rotateyaw(self.count, 2, .5, .5); self.doormodel waittill("rotatedone"); wait 60; self.doormodel rotateyaw((self.count * -1), 2, .5, .5); self.doormodel waittill("rotatedone"); self maps\mp\_utility::triggerOn(); self.doormoving = false; }
Will this work?
Moderator: Core Staff
Re: Will this work?
Join my server @ 217.163.22.223:28960
Re: Will this work?
Where would i enter this in the script?Drofder2004 wrote:Didn't see that.megazor wrote:he said it was defined in radiant:
key = count
value = 90
for the sake of testing, I would enter a value in the script and NOT in radiant.
Join my server @ 217.163.22.223:28960
-
- CJ Worshipper
- Posts: 289
- Joined: December 5th, 2009, 7:12 am
- Location: Australia
Re: Will this work?
Where you see 'self.count', replace it with 90:Lawless wrote:Where would i enter this in the script?
Code: Select all
door_move()
{
self maps\mp\_utility::triggerOff();
self.doormoving = true;
self.doormodel rotateyaw(90, 2, .5, .5);
self.doormodel waittill("rotatedone");
wait 60;
self.doormodel rotateyaw((90 * -1), 2, .5, .5);
self.doormodel waittill("rotatedone");
self maps\mp\_utility::triggerOn();
self.doormoving = false;
}
Re: Will this work?
Seems to me you have a door and a trigger, and are trying trigger commands on your door.
They dont work then.
They dont work then.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Will this work?
IzNoGoD wrote:Seems to me you have a door and a trigger, and are trying trigger commands on your door.
They dont work then.
Code: Select all
self_closing_doors()
{
doors = getentarray("bounce_trig", "targetname");
for(i = 0; i < doors.size; i++)
doors[i] thread door_think();
}
Although, honestly, I do not like the fact the door entity is a variable attached to the trigger. I would (at least while testing) make these two independant variables [door and trig].

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 5 guests