maggot202 Posted July 19, 2009 Hello I'd like to make a switch that executes a script if you have a yellow keycard, and print "you need a key" if you don't. So far, so good, but i don't want this switch to "activate" if you don't have the card, just print the message. Can this be done? 0 Share this post Link to post
Kappes Buur Posted July 19, 2009 http://www.zdoom.org/zdkb/scriptdecisions.html http://zdoom.org/wiki/ACS_LockedExecute 0 Share this post Link to post
NoWits Posted July 19, 2009 OK, here's an example for you. We'll have this in your behaviour behavior lump (bloody American spelin): #include "zcommon.acs" bool gotkey = false script 1 (void) { gotkey = true } script 2 (void) { if(gotkey) { // Open your door here. } else { print(s:"You need a key!"); } } I think that would work. Next, you have to make the key execute script 1 when picked up (special 80 - second tab in the thing properties if you're using Doom builder) and make the switch execute script 2. Tell me how it all goes! 0 Share this post Link to post
Gez Posted July 19, 2009 Nixot said:We'll have this in your behaviour behavior lump (bloody American spelin): BEHAVIOUR is nine characters, not eight. 0 Share this post Link to post
NoWits Posted July 19, 2009 Gez said:BEHAVIOUR is nine characters, not eight. I know. That's why I crossed it out. 0 Share this post Link to post
maggot202 Posted July 19, 2009 Kappes Buur said:http://zdoom.org/wiki/ACS_LockedExecute This was exactly was i was trying to do. Thanks, buddy! 0 Share this post Link to post