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 Opening Doors
AI Opening Doors
2004-12-30, 9:40 AM #1
How does this work? How does an enemy use its open door function from its AI to pass a message on to a door, and what is that message?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-12-30, 10:39 AM #2
couldn't you just use touched? Maybe? I believe there's a way to make touched messages only for actors. (But then, Cog-AI (See Rbots) won't work with it)

*goes away since he knows nothing of cog)
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-12-30, 11:27 AM #3
There's no proper way to do it that I'm aware of. You can't force an AI to activate something, although I believe they have the capability to do it. (There's just no cog verb that I know of, like MakeAIActivate() or anything.)

However, a little cog work on the door cog can produce the same effect. Just use the touched message, if an actor does the calling tell the door to open. (call activated) And it should look alright. I believe rbots used this method.
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2004-12-30, 12:23 PM #4
Ok, I'll try that, thanks.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-12-30, 1:14 PM #5
Yes... That is a problem I've noted... In JK, actors are able to open the LEC doors when they go chasing me, but they don't open simple custom doors... I could be wrong, but I think the combination of the Mask flags and the LinkID... Could be wrong... If I'm wrong, never mind then.

And, sorry for that comment earlier... Was sick, and was in a bad mood.

/Edward
Edward's Cognative Hazards
2004-12-30, 9:15 PM #6
This may be interesting to you.

This is the stdefault.ai file
Code:
# Jedi Knight AI File
#
# STDEFAULT.AI
#
# Stormtrooper/Fieldtrooper with Rifle AI
# Medium difficulty
#
# [CR]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved

alignment=-1.0, rank=0.5, fov=170, maxstep=0.2, sightdist=5.0, heardist=2.0, accuracy=0.20

#instinct			args
LookForTarget   	500.0, 45000.0
Listen          	0.75, 2.0
PrimaryFire     	2000.0, 0.8, 5.0, 0.20, 0.0, 300.0, 0.20, 0.00, 2.0, 500.0
BlindFire       	1500.0, 0.50, 0, 0.8, 0.0, 0.20
Follow          	0.0, 1.5
OpenDoors
CircleStrafe    	6000.0, 30.0, 1.5, 1000.0, 1.0
ReturnHome
Talk            	10000.0, 0.10
The ai file has a line that tells it to open doors.

Then in the standard LEC door cog file it declares doors as:
Code:
thing		door0		linkid=0 mask=0x405
thing		doorblah		linkid=123 mask=0x405
The mask 0x400 means "player"
The mask 0x004 means "actors"
The mask 0x001 means "free" (can't remember what free is right now)

By putting mask=0x404 on your door, any ai with the opendoors command should be able to work the door.

[edit] Forgot to touch on the linkid. The linkid is a means of checking which door was activated. If the senderid is 0, then door0 was activated. If the senderid is 123, then doorblah was activated. [/edit]
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-12-31, 3:23 AM #7
SG-Fan has hit the nail on the head :) - the character's AI file only stipulates that the AI may OpenDoors (usually in pursuit of a player, but this doesn't have to be the case).

In essence, with the OpenDoors instinct, the AI is able to move any object that has accompanying movement frames specified; SG-Fan's implementation shows how you obtain a handle on which AI actor triggered the opening/movement of a door (from one frame to the next).

Hope this info helps :)

-Jackpot
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2005-01-02, 1:45 PM #8
Another possible method you could implement would be "pressure plates" for the doors. If you or an actor ai walk across a specified surface, the door will be opened automatically. This could be especially helpful if you have enemies patrolling the corridors of your level (assuming LoG has many hallways in it, though I do remember seeing a castle in the rain a while back) or if they are in hot pursuit of you.

I'm sure there is a pressure plate cog in the Massassi cog section - just have a look. Also, perhaps Wolfy might have some good cogs for you which he can recycle from his LoaM series (he had some pretty neato AI and cogs in that level). :)
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels

↑ Up to the top!