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

ACS and Keys are driving me insane

Recommended Posts

I'm running into some annoying problems with my map.

After defeating the boss, he runs a script which is supposed to set a variable, change the music, project a red key and autosave. However, all of it works EXCEPT the key. Any ideas?

Script 13 (void)
{
bossded = 1;
Thing_Projectile(1337,86,0,0,-1); -- I also tried t_redkey and t_redkeycard. Same result
setmusic("d_sewers");
autosave();
}
I'm also trying to strip the player's keys at the end of the level to stop him from travelling to the hub map with the keys in his inventory, but it doesn't work either.
script 19 (void)
{
TakeInventory(85,1);
TakeInventory(86,1);
TakeInventory(87,1);
}

Share this post


Link to post

1.

SpawnSpot("RedCard",1337);
2.
TakeInventory("BlueCard",1);
TakeInventory("YellowCard",1);
TakeInventory("RedCard",1);
TakeInventory("BlueSkull",1);
TakeInventory("YellowSkull",1);
TakeInventory("RedSkull",1);
Next time read zdoom wiki for reference of the respective functions, and pay attention to their parameter types. Sometimes they require a classname (as text), sometimes spawn number, etc.

Share this post


Link to post

None of those worked.

Though I just tested another wad that uses a similar technique for giving players the keys, and it turns out it suddenly stopped working there too. Seems to be a problem with Zandronum. I'm gonna test it on Zdoom.

Share this post


Link to post
Buu342 said:

None of those worked.

Though I just tested another wad that uses a similar technique for giving players the keys, and it turns out it suddenly stopped working there too. Seems to be a problem with Zandronum. I'm gonna test it on Zdoom.

Open your wad using slade and remove the BEHAVIOR lump then re-compile your script and see if it'll work .

Share this post


Link to post
Buu342 said:

None of those worked.

Have you verified (via a testing text display, etc) that the scripts are being called at all? Are your TIDs correct? In case of the latter script, the player himself should be the script activator, otherwise it won't work.

Share this post


Link to post

The script that takes the keys from inventory must be executed this way :

http://zdoom.org/wiki/ACS_Execute

It should look like this

Script 13 (void)
{
bossded = 1; Thing_Projectile(1337,86,0,0,-1);
setmusic("d_sewers");
autosave();
ACS_Execute (19, mapnumber, 0, 0, 0) //Executes the script that takes keys away .
}

Share this post


Link to post
DMGUYDZ64 said:

Open your wad using slade and remove the BEHAVIOR lump then re-compile your script and see if it'll work .


Interestingly, this solution fixed it! Then in that case something must be off with my Doom Builder 2 app. Thanks!

This fixed both the stripping of the keys and the dropping of the red key

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×