Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Parapsyche

Scripting question

Recommended Posts

Hey there. I've been attempting to do something in my wad lately, and have been having trouble figuring out exactly how to go about making it work. I've run into a few problems, and I'm hoping you guys might be able to help me out.

OK, so what I want to occur is for the player to have their blue keycard removed from their inventory when they use a keycard slot (just a structure in the wall), as well as have a ceiling lower in the keycard slot which is blue coloured, such that it looks like the key has been inserted, as well as unlock a door.

The way I've been trying to do this is using a script in DoomBuilder that goes something like this, I think...

Script 8 (Void)
{
Player_RemoveItem(Blue keycard value (5, I think), "Access Granted")
Ceiling_LowerInstant(values and such)
Door_Raise(values)
}

Now, the main problem is that for some reason, when I try to compile the script, it says something along the lines of "Player_RemoveItem is used but not defined", and then it won't compile.

Another thing I tried was for a blue key to actually appear in a location inside the card slot, but I can't seem to get that function to work correctly either. Anyway, any help would be greatly appreciated. I'm really interested in learning how to do some of these neat tricks.

Thanks in advance!

Share this post


Link to post

As far as I know, player_remove item is not a valid action. Your script should look something more like this:

script 1 (void)
{
takeinventory("BlueCard");
print(s:"Access Granted");
ceiling_lowerinstant(Sector ID);
door_open(sector tags and such here);
}

Assuming you want to leave the door open after the player has used the key, you'll want to use door_open instead of door raise, but your script should look more like that.

Share this post


Link to post

Well, I can get it to work, except for any of the ceiling and door functions...platform and floor functions also don't work, and give me this error whenever I try to compile:

"Ceiling_LowerInstant is used but not defined."

How can I keep this from happening? Is there some update that I need in order to use these script commands?

Share this post


Link to post

Which port are you using this on? Doombuilder should recognize the Ceiling_LowerInstant function. Whenever it gives you a message likethe one you posted, it ususally means that DoomBuilder can't find the function in the acs files.

To make sure you're using the right function, go into the DB script editor and hit Ctrl+Space to bring up a list of specials. Scroll down to the ceiling functions and see if you can find the one you are looking for.

Share this post


Link to post

Yeah, I checked the list and the function is there...plus it turns blue whenever I type it in, so it seems that DoomBuilder does recognize it. It's typed correctly and everything. But it's still giving me the same problem. I have the latest version of DoomBuilder as well...I'm not exactly sure what you mean when you ask what port I'm using, however.

I just wish it would work so I could make this thing, lol.

Share this post


Link to post

lol, god. I accidentally put common.acs instead of zcommon.acs. It's amazing how much trouble one little typo can cause you. Thanks for the help!

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×