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 → AI Movement cog....
AI Movement cog....
2003-02-23, 1:53 PM #1
I need a cog, that when the player crosses an adjoin, a group of 2 AI's walk from their current position to a ghost object. Once they reach the ghost object, they are deleted. During this entire duration, the AI must be "asleep", so they basically act as if they do not see the player, do not shoot at him, and anything the player does has no effect on them, they can not even be killed or hurt. Tell me if you need me to be more clear, thanks!

------------------

Restless 2

Sanctum de la Mort

[This message has been edited by Dash_rendar (edited February 23, 2003).]
2003-02-23, 2:47 PM #2
The answer is here.
Code:
# Jedi Knight Cog Script
#
# AI cog for Dash_rendar
#
# [DP]
#
symbols
thing             moveThing
thing             moveThing1
vector            movePos
vector            movePos1
flex              moveSpeed
flex              distance
surface           doStuff
int               i                     local
message           crossed
end
# ========================================================================================
code
   Crossed:
   If(GetSourceRef() != GetLocalPlayerThing()) Return;
   For(i=0 i<2; i++)
   {
      AISetMoveSpeed(moveThing, moveSpeed);
      AISetMovePos(moveThing, movePos);
   }
   While(VectorDist(GetThingPos(moveThing), movePos) < distance);
   DestroyThing(moveThing);
   DestroyThing(moveThing1);
   Return;
end
This should work, but untested. So this is theoritical work if you will. For the actors, make sure their templates have no AI file, and they, include their parents, don't have a health number, else make it really really high. And their ya go. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-02-23, 3:00 PM #3
...That won't work. You can't use the AI verbs unless there is actually an AI specified in the template.

------------------
His pot is blacker than his kettle!

Phoenix Swords
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2003-02-24, 1:59 AM #4
Here's an idea:
Code:
# Move and poof!
#
# By Edward
symbols

message    crossed

thing      movething1
thing      movething2

surface    x

thing      movepos1
thing      movepos2

flex       distance

end
#
code
crossed:
        If(GetSenderRef()!=x) return;
        AISetMovePos(movething1,GetThingPos(movepos1));
        AISetMovePos(movething2,GetThingPos(movepos2));
        sleep(distance);
        DestroyThing(movething1);
        DestroyThing(movething2);
return;
end

As I don't know how to test if an AI has stopped, I set a sleep called distance.
If you want the AIs to sleep, add 00_aisleep.cog. If you want the AI Invul, well, that's a different COG.

/Edward


[This message has been edited by Edward (edited February 24, 2003).]
Edward's Cognative Hazards
2003-02-24, 3:41 AM #5
Quote:
<font face="Verdana, Arial" size="2">Originally posted by LordVirus:
...That won't work. You can't use the AI verbs unless there is actually an AI specified in the template.
</font>


Have you accually tried using AI verbs without an AI file?


------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-02-25, 4:12 PM #6
It doesnt work. [http://forums.massassi.net/html/frown.gif]

------------------

Restless 2

Sanctum de la Mort
2003-02-25, 11:00 PM #7
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Descent_pilot:

For(i=0 i<2; i++)
</font>



That is so totally screwed up. This aint C, dude, this is cog. 'i++' doesnt work. Accept it, and move on.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');

[This message has been edited by GBK (edited February 26, 2003).]
And when the moment is right, I'm gonna fly a kite.
2003-02-26, 9:25 AM #8
Stupid school, making screw up my cog!!!!!!!! [http://forums.massassi.net/html/mad.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-02-27, 9:34 AM #9
jeah i++ rules the galaxy [http://forums.massassi.net/html/smile.gif]

------------------
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..
2003-02-27, 9:43 AM #10
Lol. [http://forums.massassi.net/html/tongue.gif]

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-27, 10:11 AM #11
yeah I++ ruling the - galaxy :-)

------------------
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..

↑ Up to the top!