Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Two cog questions
Two cog questions
2001-04-22, 1:58 PM #1
Is there any cog that will cause a turret to fire at enemies, and not you or your allies? And, is there a cog that will cause a specific character to try to head to a certain sector, but you don't have to provide a patrol path for it? Thanks

------------------
The protagonist is trying very, very hard to think very clearly about trying not to think about something else. Read it again.
The protagonist is trying very, very hard to think very clearly about trying not to think about something else. Read it again.
2001-04-23, 11:32 AM #2
I hope you are asking this question about SP levels...
To make a turret not fire at you (player) you just need to (in the cog that makes the turret fire) where it gets the FirstThingInView, add a line that checks the if the thing is a player and returns if it is.
Code:
if (GetTypeFlags(target)=0x400) return;


For the second question:
To make an actor move to a certain sector, use the command
Code:
AiSetLookPos(youractor, GetSectorCenter(yoursector));
AiSetMovePos(youractor, GetSectorCenter(yoursector));

when you have a sector symbol declared in your cog called yoursector and a thing called youractor.
This will make the actor look move toward a the sector.
Note: The actor will only try to move to the sector in a straight line. If it runs into an inside corner it may get stuck. [http://forums.massassi.net/html/smile.gif]

-------
dBcLiCk (The Spaman)
2001-04-23, 2:44 PM #3
Thanks...for the first cog though...what do I add to make it not fire at allies? It wouldn't look right if I had turret ignoring me but happily killing stormies and rebs right and left. The second cog will be really helpful.

------------------
The protagonist is trying very, very hard to think very clearly about trying not to think about something else. Read it again.
The protagonist is trying very, very hard to think very clearly about trying not to think about something else. Read it again.

↑ Up to the top!