Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: buttkicker845 on July 07, 2016, 11:12:50 pm
Title: Doors that requires keys to open
Post by: buttkicker845 on July 07, 2016, 11:12:50 pm
History of script: This is a script that i started writing over a year ago, i got side tracked and forgot about it. I recently saw someone on the forum request something similar and gave me the idea to just go ahead and finish the script.
Description of the script: Its a simple script that makes it so the players have to find and pick up keys before they are allowed to open the door. there can be unlimited doors and each one can have a different number of keys required. the door can also still require points to open if you so choose
it also DOESN'T require you to use a trigger for the keys saving you half of the script entities that would normally be used for having keys to pick up
Features: The script can be customized 4 different ways in order to make it work how you wish - These modifications include if the key location will be randomly selected in the world - how many keys should be kept in the world - the distance the player must be from the key in order to pick it up - the default value for how many keys each door requires to open, this can be overridden for each door by placing script_vector on your door trigger
glad you guys can use it, let me know if there are any problems :)
Sometimes the hintstring breaks and shows a wrong number
Title: Re: Doors that requires keys to open
Post by: IamTIMMEHHH on May 03, 2017, 06:53:31 pm
I followed the script twice but i still dont get a ''press f to pick up key'' hintstring also cant pick it up.
Title: Re: Doors that requires keys to open
Post by: Deer2014 on January 14, 2018, 09:56:38 pm
Guys, does anybody work random key position?
I have a door, the door trigger kvp is: targetname -> key_door
I have 5 script model (keys), the kvp of 5 script model: targetname -> door_key
the script init() variables:
The mapname.gsc:
In the game I can see the 5 keys, I picking up one, then script delete all and open the door. But I just want to see 1 key in different locations each game. Is possible? What did I ruin it?
Can anyone help me? Thx.
Title: Re: Doors that requires keys to open
Post by: BluntStuffy on January 14, 2018, 10:18:45 pm
Quote
Step 3: the numberOfKeysInWorld will modify how many keys will remain in the world after the useRandomKeyLocations is used, only effects if useRandomKeyLocations is true
set this to 1:
Title: Re: Doors that requires keys to open
Post by: Deer2014 on January 15, 2018, 12:09:26 am
Ohh, I was careless. :-\ Thanks BluntStuffy. ;)
Title: Re: Doors that requires keys to open
Post by: Deer2014 on January 16, 2018, 12:46:55 pm
Hi guys,
I tried the above "no cost" script modification and I get the script compile error (syntax error). I found the cause of the problem. On line 5 the less equal relation signal is wrong.
Wrong script detail:
Correct script detail:
Title: Re: Doors that requires keys to open
Post by: buttkicker845 on January 16, 2018, 01:28:27 pm
I tried the above "no cost" script modification and I get the script compile error (syntax error). I found the cause of the problem. On line 5 the less equal relation signal is wrong.
Thank you for catching that! :D When I wrote the documentation i re-wrote it rather than copying it straight from the script. I have updated the original post
Title: Re: Doors that requires keys to open
Post by: Deer2014 on March 13, 2018, 03:09:31 pm
Hi,
I would like to ask some help.
I have more doors in my map. I want to hide at least 3 keys for each door randomly. And I want to open each door with 1 key, which can be accessed in 3 different places.
Now I have two doors and I have set trigger_use for both doors: targetname = key_door, but when I find the key, I can open both doors, it is not good for me. :( So, I want to set 1 key to the other door, which is also in 3 different locations.
It is possible? How to do it?
Thx.
Title: Re: Doors that requires keys to open
Post by: Fancygamer1738 on March 25, 2018, 04:55:43 pm
Exactly what I needed for my map! Thanks a ton! :nyan: