Modme Forums
Menu:

shoot objects to open door

Game Modding | Call of Duty: Black Ops 3 | General Discussion


ModmeBot:

Thread By: Fil he Modder
so basically, I want to make it so when i shoot like 4 power boxes around my map, a door will open but i don't know how to achieve this, can somebody help me?


ModmeBot:

Reply By: soul-toktzt

Fil he Modder
so basically, I want to make it so when i shoot like 4 power boxes around my map, a door will open but i don't know how to achieve this, can somebody help me?

Use a trigger_damage instead of a trigger_use.


ModmeBot:

Reply By: Fil he Modder
Do any kvps follow?


ModmeBot:

Reply By: Abnormal202
http://aviacreations.com/modme/index.php?view=topic&tid=1130


ModmeBot:

Reply By: itznvy
Hate Smith also made a door that opens after shooting a specific number of items. It's on his website. natesmithzombies.com


ModmeBot:

Reply By: Fil he Modder
ye, i tried the nate's script and tutorial but it doesn't explain enough


ModmeBot:

Reply By: D-2-K
Fil he Modder
ye, i tried the nate's script and tutorial but it doesn't explain enough

he explains it very well

Open your mapname.gsc located in usermaps>zm_mapname>scripts>zm and add this to your mapname.gsc:

add this

level shootable_trigs();

Underneath:
function main()
{

Add this function to the very bottom of your mapname.gsc:

function shootable_trigs()
{
level.shootable_door_count = 0;
trigs = GetEntArray( "shootable_door", "targetname" );
level.shootable_door_goal = trigs.size;
foreach( trig in trigs )
trig thread wait_for_shoot();
}
function wait_for_shoot()
{
self waittill( "trigger", player );
player PlayLocalSound( "zmb_cha_ching" ); // Change this to any sound alias you want
level.shootable_door_count++;
if( level.shootable_door_count == level.shootable_door_goal )
self open_door();
}
function open_door()
{
doors = GetEntArray( "shootable_door_reward", "targetname" );

foreach( door in doors )
door PlaySound( "zmb_cha_ching" );
wait(0.05);
foreach( door in doors )
door delete();

flag = doors[0].script_flag;
level flag::set( flag );
}

then

<ol><li>In 'Entity Browser' place as many trigger>damage triggers as you would like (OPEN ENTITY BROWSER SEARCH FOR TRIGGER DRAG TRIGGER DAMAGE ONTO MAP) with the following KVP's ( Press N with the trigger selected to add KVPs )</li>
<li></li>
<li> (THESE ARE THE KVP'S) = targetname - shootable_door </li>
</ol>
<ol><li>Place a script>model or script>brushmodel with the following KVPs:</li>
</ol>
(again these are the kvps) targetname - shootable_door_reward
script_flag - flag_to_start_spawners_in_this_zone

<ol><li>( SO WHAT HES SAYING HERE IS TO DRAG A MODEL OF A DOOR ONTO THE MAP SELECT IT AND MAKE IT A SCRIPT MODEL NOW YOU CAN DO THIS BY SELECTING THE MODEL GOING TO ENTITY BROWSER AGAIN SEARCH FOR SCRIPT YOU WILL SEE A LIST OF BRUSHMODEL, MODEL,ORIGIN,STRUCT WITH THE MODEL SELECTED HIT MODEL IN THE LIST THIS CONVERTS THE REGULAR MODEL TO A SCRIPT MODEL )</li>
</ol>

<ol><li>hint/tip with most things in radiant you can right click on them and toggle favorite this will save you from having to go to your entity browser all the time you just right click on an item or your map and what your looking for is in that list i use this feature a lot when mapping for lights, probes,script,volume decals etc </li>
</ol>

finally

Note: Place as many doors as you would like just be sure they all have the same KVPs and that the script_flag is the name of the flag that you would normally put on the trigger of the door to initiate the spawners in that zone. The script_flag is intentionally on the door and not the trigger in this script DONT PUT THE SCRIPT_FLAG ON THE TRIGGERS


i hope i made this a little clearer as i don't know how much you know or not

not trying to be obnoxious at all just trying to lend a hand

good luck buddy have fun modding




ModmeBot:

Reply By: Fil he Modder
thanks, its just the fact that i put all of the kvps in correctly but it dowsn't open the door, like i put a script_vector and a script_sting on it to move out of the way but it just does't do it, that's my main problem :/


ModmeBot:

Reply By: Wild

Fil he Modder
thanks, its just the fact that i put all of the kvps in correctly but it dowsn't open the door, like i put a script_vector and a script_sting on it to move out of the way but it just does't do it, that's my main problem :/

Nate's script works fine. You just need to make sure you actually do 100% of what it says and you can't say it doesn't work because I have used his script and it works just fine. His script actually deletes the door instead of moving it so you don't a script_vector. Just do exactly what his tutorial says and it will work. You said you added all the KVP's but the door doesn't move. Make sure if you door is made out of a brush you turn it into a script_brushmodel and if the door is a normal model turn it into a script_model. You 100% need to do that or nothing will happen to the door. Like I said Nate's script works 100% perfectly so just make sure you do everything exactly how he says. Hope that helps.