PDA

View Full Version : Stormtrooper through a door in single player cog...



DevoSolo
01-16-2001, 09:08 PM
Hey, since Jipe is sleeping and I need this cog as soon as humanly possible(addicted to editing), I was hoping I could get a cog for my stormtrooper ai to walk through a door. I know this is easy, so If anyone could post a cog they already have, or slap something together quicky-style, that would be the most helpful. Just need the door to open when you get close to it, not with the USE command.

LAter...

------------------
I always drink coffee while I watch radar!

Fernando_the_Hunn
01-18-2001, 02:04 PM
try this:


symbols
float dist
thing door
thing trooper
message startup
message pulse
message timer
end
code
startup:
MoveToFrame( door, 0 );
SetPulse( 1.0 );
return;
pulse:
if( VectorDist( trooper, door ) < dist )
{
MoveToFrame( door, 1 );
SetTimer( 5.0 );
}
return;
timer:
MoveToFrame( door, 0 );
return;
end



I believe this might be what you are looking for, You might want to check the syntax, since i am not as up on my cogging as I used to be http://216.105.160.32/html/frown.gif

------------------
cogs dont kill people. people kill people...

mailto:no_oneatall@hotmail.comno_oneatall@hotmail. com</A>
ICQ 81116825
===========================================
Evil Cog master of the Western TC!

DevoSolo
01-18-2001, 06:51 PM
Well, I tried it and couldnt figure out how to implement it... Whats the flex do? Do I use this cog by itself? Or with the aiframepatrol.cog? The stormtrooper didnt open the door, just stood at it. I looked at your script, but I know nothing about Cog language. I tried setting the flex to the sector for the ai to walk into, didnt work. I also set it to 2 and then 1, but neither of them worked. Ive got a gob of the level here (http://members.xoom.com/Hansbolo/SINGLE.zip) if anyone wants to check it out in it's beginning stage, you'll get the picture. You will receive deserved credit for your helping a Newbie editor.

------------------
I always drink coffee while I watch radar!

DevoSolo
01-27-2001, 03:42 PM
CAn somebody re-check this cog? It looks right, but Im having a hard time getting it to work. I must have this working quickly. I have too many ideas involving this cog.