Okey - i try to change that cog to work with ATR and with sector that it entering after run. Problem is similar : This wont work :|
also, I need to add 2 or 3 fighters that will folow and attack ATR (perhaps demaged should have more then 1 run), so someone (GBK
) can help?
About Err check : when player active panel on board of ATR he see new post (sky) but, few moment late (after pulse) game broke...
------------------
Code:
# ATR fly
#
# 2/2002 stand of GBK's mouse vision cog . EH_AceCSF
Symbols
Message Startup
Message Activated
Message Pulse
Message Damaged
Thing Panel
Thing Player Local
Thing ATR linkid=0
Thing Cam Local
Thing Ally0
Thing Ally1
Thing Ally2
Thing Ally3
Thing Ally4
Thing Ally5
Thing Newpost0
Thing Newpost1
Thing Newpost2
Thing Newpost3
Thing Newpost4
Thing Newpost5
Thing Newpost6
Int StopFall=1 local #Move in slow controlled fashion?
Int Fly=0 local #Fly?
sector endsec
Flex Ac=4
Template shot
thing gh local
End
Code
Startup:
Player = JKgetlocalplayer();
Capturething(ATR);
Stop;
Activated:
Playsoundpos(Beep, Surfacecenter(Switch), 1, 0, 10, 0);
Cam = Createthingatpos(shot, Getthingsector(ATR), Vectoradd(Getthingpos(ATR), '0 0 0.0001'), '0 0 0');
Attachthingtothingex(Cam, ATR, 0x8);
Setcamerafocus(0, Cam);
Setcamerafocus(1, Cam);
Setactorflags(Player, 0x40000);
Setpulse(0.01);
Stop;
Pulse:
If(Getdebugmodeflags() == 0x400) Setpulse(0.0005); Else Setpulse(0.01);
If(!Getcurrentcamera()) Setthingcurgeomode(ATR, 0);
Else Setthingcurgeomode(ATR, 4);
Gh = Fireprojectile(Player, shot, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);
If(Gh == -1) { Print("Lookvector ghost creation failure."); Stop; }
Setthinglook(ATR, Vectorset(Vectorx(Getthinglvec(Gh)), Vectory(Getthinglvec(Gh)), 0));
Setthinglook(Cam, Getthinglvec(Gh)); Destroything(Gh); Gh = -1;
If(Isthingcrouching(Player) == 1) {
If(!Fly) Setthingvel(ATR, Vectorscale(Vectorset(Vectorx(Getthinglvec(ATR)), Vectory(Getthinglvec(ATR)), 0), Ac));
Else Setthingvel(ATR, Vectorscale(Getthinglvec(Cam), Ac)); }
Else If(StopFall) Stopthing(ATR);
If (GetThingSector(ATR) == endsec);
{
TeleportThing(Player, Newpost0);
TeleportThing(Ally0,Newpost1);
TeleportThing(Ally1,Newpost2);
TeleportThing(Ally2,Newpost3);
TeleportThing(Ally3,Newpost4);
TeleportThing(Ally4,Newpost5);
TeleportThing(Ally5,Newpost6);
Destroything(ATR);
Setpulse(0);
Setcamerafocus(0, Player); Setcamerafocus(1, Player);
Destroything(Cam);
Clearactorflags(Player, 0x40000);
}
Stop;
Damaged:
if ((GetSenderID() == 0)
Setpulse(0);
JKendlevel(0);
Stop;
Endalso, I need to add 2 or 3 fighters that will folow and attack ATR (perhaps demaged should have more then 1 run), so someone (GBK
) can help?About Err check : when player active panel on board of ATR he see new post (sky) but, few moment late (after pulse) game broke...
------------------
