Code:
# Jedi Knight Cog Script symbols message startup message activated message killed message pulse thing lostghost thing door0 linkid=1 thing door1 linkid=1 thing tech0 linkid=2 thing tech1 linkid=2 thing bot surface swith0 surface swith1 sector target template spark=+sparks local sound sparksound int reparied=0 local end code startup: SetWallCel(swith0,2); SetWallCel(swith1,2); SetSectorAdjoins(GetThingSector(door0),0); SetPulse(1.0); return; activated: if (reparied==0) { Print("Sorry. Door is broken."); } if ((reparied==1) (GetSenderRef()==door0)||(GetSenderRef()==door1)) { MoveToFrame(door0, 1, 2); MoveToFrame(door1, 1, 2); waitforstop(door0); sleep(6); MoveToFrame(door0, 0, 2); MoveToFrame(door1, 0, 2); } return; pulse: if (GetThingSector(bot)==target) { SetPulse(0.0); Print("Ok, now i can repair door"); reparied=1; } return; killed: Print("Mission Failet. Please enter menu and press restart button or load last saved"); Player=GetLocalPlayerThing() Teleportthing(Player, lostghost); return; end
i also need to add sparky blowing from door in random moment. If someone can help ..
------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..