UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Script Help

broken avatar :(
Created 11 years ago
by Tim Smith
0 Members and 1 Guest are viewing this topic.
4,585 views
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social LinksTimSmithtimsmith90THEREALBaDBoY17My clan Website
Sup , i'm want to make like an easter egg blowing 2 spots that make a door open

i adjusted zk shoot-able door can anyone look at this and tell me it's correct or not

P.S : i want it MOD_EXPLOSIVE

Here's the script :

Code Snippet
Plaintext
zk_shootable_door() // Edited By Tim Smith [Hero11507]
{
door = getEnt("dust_door", "targetname");     // this will be the door that opens
shoot_me = getEnt("tim_a", "targetname");   // this is the First trigger that you toss an c4
shoot_me2 = getEnt("tim_b", "targetname");  // this is the Second trigger that you toss an c4


flag_wait("all_players_connected");
// door moveZ(0, 0); // will use it later ofc


shoot_me waittill("trigger");
iprintlnBold("^3BombSite ^1A ^3Destroyed , Good Work Mate !"); // BombSite A
wait 1;
shoot_me delete();
// little Space between scripts always helps :v [Tim]
shoot_me2 waittill("trigger");
iprintlnBold("^3BombSite ^1B ^3Destroyed , Good Work Mate !"); // BombSite B
wait 1;
shoot_me2 delete();
// Here what i don't know :| but i believe that it's if [mod,explosive]

play_sound_at_pos("door_slide_open", door.origin); // i Think I will change the sound :| the default is door_slide_open
door MoveZ (-900, 25);
//door MoveY (500, 20);
//door MoveX (500, 20);
iprintlnBold("You Opened The Ending Door , Good Job"); // remove this line if you don't want it to say that
wait 1;
}

broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
You could make the trigger be trigger_damage or hurt (seriously, for the life of me I cant remember this) and then just do check for what weapon player has
Code Snippet
Plaintext
if(player hasWeapon("c4"))
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This should work if you want them to have to destroy one then the other, and don't delete any models or anything. The flag wait isn't needed but won't hurt it. But if you want to be able to do either and want a model to disappear as well I would recommend using something else more like this:

Code Snippet
Plaintext
AccessDoors(){
    doors = GetEntArray( "dust_door","targetname" );
    array_thread( doors,GetMyTrigs );
}
GetMyTrigs(){
    trigs = GetEntArray( self.target,"targetname" );//each trig multiple has damage checked on it, and is the target of the door for it
    self.count = trigs.size;
    array_thread( trigs,SetupDoor,self);
}
SetupDoor(door){
    self waittill("trigger");
    text = "";
    if(isDefined(self.script_string)) text = " ^1"+self.script_string;//define script_string for the trigger to adjust iprintlnbold
    iprintlnBold("^3BombSite" + text + " ^3Destroyed , Good Work Mate !");
    if(IsDefined( self.target )){
        model = getent(self.target, "targetname");//you could also not use a trigger and make the model candamage, but that is different
        //playfx(level._effect[fx], model.origin);//maybe play explosion or something
        model delete();
    }
    door.count = door.count - 1;
    if(door.count<=0){
        play_sound_at_pos("door_slide_open", door.origin);
iprintlnBold("You Opened The Ending Door , Good Job");
        door ConnectPaths( );//so the zombies can go through it after opened
        door NotSolid( );//so the player doesn't get stuck
        if(IsDefined( door.script_vector ))
            door MoveTo( door.origin + door.script_vector,1 );
        else
            door MoveZ( -900,1 );//your time was really slow
    }
}

In this setup, completely untested, just a theory, you would make your triggers the target of the door and any ents that you want to disappear when a trigger is triggered the target of that trigger. This should work for as many doors as you want and for as many triggers as you want per door.
Last Edit: September 10, 2015, 02:29:04 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social LinksTimSmithtimsmith90THEREALBaDBoY17My clan Website
This should work if you want them to have to destroy one then the other, and don't delete any models or anything. The flag wait isn't needed but won't hurt it. But if you want to be able to do either and want a model to disappear as well I would recommend using something else more like this:

Code Snippet
Plaintext
AccessDoors(){
    doors = GetEntArray( "dust_door","targetname" );
    array_thread( doors,GetMyTrigs );
}
GetMyTrigs(){
    trigs = GetEntArray( self.target,"targetname" );//each trig multiple has damage checked on it, and is the target of the door for it
    self.count = trigs.size;
    array_thread( trigs,SetupDoor,self);
}
SetupDoor(door){
    self waittill("trigger");
    text = "";
    if(isDefined(self.script_string)) text = " ^1"+self.script_string;//define script_string for the trigger to adjust iprintlnbold
    iprintlnBold("^3BombSite" + text + " ^3Destroyed , Good Work Mate !");
    if(IsDefined( self.target )){
        model = getent(self.target, "targetname");//you could also not use a trigger and make the model candamage, but that is different
        //playfx(level._effect[fx], model.origin);//maybe play explosion or something
        model delete();
    }
    door.count = door.count - 1;
    if(door.count<=0){
        play_sound_at_pos("door_slide_open", door.origin);
iprintlnBold("You Opened The Ending Door , Good Job");
        door ConnectPaths( );//so the zombies can go through it after opened
        door NotSolid( );//so the player doesn't get stuck
        if(IsDefined( door.script_vector ))
            door MoveTo( door.origin + door.script_vector,1 );
        else
            door MoveZ( -900,1 );//your time was really slow
    }
}

In this setup, completely untested, just a theory, you would make your triggers the target of the door and any ents that you want to disappear when a trigger is triggered the target of that trigger. This should work for as many doors as you want and for as many triggers as you want per door.

gonna test this now ... basically you're saying if i change this
Code Snippet
Plaintext
self.target
which is in this line underneath and called it like tim instead of self.target this will make it for the both trigger_damage but though it's not making it MOD_EXPLOSIVE right ???

if i shoot it with a rifle it will open if i toss a grenade it will open .

Code Snippet
Plaintext
trigs = GetEntArray( self.target,"targetname" ); //each trig multiple has damage checked on it, and is the target of the door for it


Double Post Merge: September 10, 2015, 04:13:10 pm
You could make the trigger be trigger_damage or hurt (seriously, for the life of me I cant remember this) and then just do check for what weapon player has
Code Snippet
Plaintext
if(player hasWeapon("c4"))

hitman i think that doesn't define which damage the trigger is getting :/ still dk 
Last Edit: September 10, 2015, 04:13:10 pm by Tim Smith
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Good luck. I'm not following your first comment.

You can adjust what damages the trigger by selecting the check boxes you don't want to trigger it, (trigger_damage)
Last Edit: September 10, 2015, 04:16:36 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social LinksTimSmithtimsmith90THEREALBaDBoY17My clan Website
Good luck. I'm not following your first comment.

You can adjust what damages the trigger by selecting the check boxes you don't want to trigger it, (trigger_damage)

thx for your help :) kk will do
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
hitman i think that doesn't define which damage the trigger is getting :/ still dk

   shoot_me = getEnt("tim_a", "targetname");   // this is the First trigger that you toss an c4

I was looking at this, so I thought you meant only C4 damage would trigger the trigger, not like grenades and such
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
I was looking at this, so I thought you meant only C4 damage would trigger the trigger, not like grenades and such
should really check "current" weapon, or follow what the grenade type weapon that was thrown is rather than "hasWeapon" if you were to do your method, just as a note ;)

Otherwise grenades would trigger it too, as you could still "have" the c4, and i think if you havae 0 ammo after the throw, hasWepaon returns false ( i think, as i think i had this issue with the shield, had to use isDefined( hasWeapon() ) ) etc ;)
Last Edit: September 10, 2015, 07:59:24 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
should really check "current" weapon, or follow what the grenade type weapon that was thrown is rather than "hasWeapon" if you were to do your method, just as a note ;)

Otherwise grenades would trigger it too, as you could still "have" the c4, and i think if you havae 0 ammo after the throw, hasWepaon returns false ( i think, as i think i had this issue with the shield, had to use isDefined( hasWeapon() ) ) etc ;)

Its actually not really possible to be 100 percent accurate using either. You can throw a grenade and switch to c4 and fake it too. If 100 percent is desired, you would need to check another way, either by a use trigger, or something else.
Last Edit: September 10, 2015, 08:07:57 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Its actually not really possible to be 100 percent using either. You can throw a grenade and switch to c4 and fake it too. If 100 percent is desired, you would need to check another way, either by a use trigger, or something else.
only way i can think of is waittill( "grenade_fired", weapname );

then track weap name, but you are right, there can be draw backs in some way to all methods yea
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Yeah, perhaps tracking if the c4 location is close enough to the trigs maybe. That prob would work too. Just not current weapon or has weapon, if you want 100 percent.
Last Edit: September 10, 2015, 08:11:25 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Yeah, perhaps tracking if the c4 location is close enough to the trigs maybe. That prob would work too. Just not current weapon or has weapon, if you want 100 percent.
Agreed :)

 
Loading ...