Enemy AI Opening Locked Doors

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Wonderland
001 Forum Master
 
Joined: Tue Dec 21, 2010 4:18 pm
Location: Canada

Enemy AI Opening Locked Doors

Postby Wonderland » Wed Aug 03, 2016 6:48 am

Is there a way to prevent enemy AI from opening locked doors? Thanks.

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Enemy AI Opening Locked Doors

Postby JimmySterylian » Wed Aug 03, 2016 7:53 am

No but you can prevent them from opening the door by putting a comparison branch inside the "Went to open door" trigger checking if the related actor is a playable character, if it is, make the door open, if it's not, do nothing.
Image

User avatar
Wonderland
001 Forum Master
 
Joined: Tue Dec 21, 2010 4:18 pm
Location: Canada

Re: Enemy AI Opening Locked Doors

Postby Wonderland » Wed Aug 03, 2016 8:33 am

Would you use a comparison branch? How do you check who the related actor is?

User avatar
JimmySterylian
001 Fanatic
 
Joined: Tue Jul 29, 2014 2:28 pm
Location:  ­ 

Re: Enemy AI Opening Locked Doors

Postby JimmySterylian » Wed Aug 03, 2016 9:38 am

Like so:
Image

User avatar
Wonderland
001 Forum Master
 
Joined: Tue Dec 21, 2010 4:18 pm
Location: Canada

Re: Enemy AI Opening Locked Doors

Postby Wonderland » Wed Aug 03, 2016 10:10 am

Thanks, I will try that. If you don't get back, assume it works!

User avatar
SBG
001 Subscriber
 
Joined: Thu Jun 17, 2010 8:37 pm
Location: merca

Re: Enemy AI Opening Locked Doors

Postby SBG » Wed Aug 03, 2016 4:32 pm

Keep in mind if the door is able to be unlocked, you'll have to add a little more to that script so AI can open unlocked doors.

User avatar
Wonderland
001 Forum Master
 
Joined: Tue Dec 21, 2010 4:18 pm
Location: Canada

Re: Enemy AI Opening Locked Doors

Postby Wonderland » Thu Aug 04, 2016 6:11 am

Thanks!


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron