Phd Flopper

broken avatar :(
Created 1386 days ago
by OptomusPrime22
0 Members and 1 Guest are viewing this topic.
5,528 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 January 2016
Last active: 1250 days ago
Posts
23
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
OptomusPrime22's Contact & Social Links
So I seen a map floating around with phd, it was legacy city I think. Well any way I want to add phd to my map, I have the model and shader done but for the life of me I cant not take explosive damage. I could care less about the exploding flop unless we could incorporate sliding into it. So if some one could provide the script or point me in the right direction for a noob at scripting that would be great!
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: at
Date Registered: 26 November 2016
Last active: 758 days ago
Posts
45
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
12 year old music critic, quadrasexual Minecrafter, Linkin Park fan, Hentai enthusiast, intelligent atheist and vegan.
×
Cxwh's Groups
Cxwh's Contact & Social LinksCxwhModsGodAspire
Could be wrong I've never tried it but I know that's the way I did it in BO2 GSC
self SetPerk("specialty_detectexplosive"); //specialty_detectexplosive -> phd
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 January 2016
Last active: 1250 days ago
Posts
23
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
OptomusPrime22's Contact & Social Links
Could be wrong I've never tried it but I know that's the way I did it in BO2 GSC
self SetPerk("specialty_detectexplosive"); //specialty_detectexplosive -> phd

I personally don't think this would work because of the changes from bo2 to bo3 but I may be wrong...

Double Post Merge: December 11, 2016, 06:53:55 am
This is my current code which was shown to me but when I get flopper than take any form of damage it tells me connection interrupted even in local solo...

function checkCustomPerk()
{
level.overridePlayerDamage = &player_damage_override;
}

function player_damage_override( sMeansOfDeath )
{
if ( sMeansOfDeath == "MOD_PROJECTILE" || sMeansOfDeath == "MOD_PROJECTILE_SPLASH" || sMeansOfDeath == "MOD_GRENADE" || sMeansOfDeath == "MOD_GRENADE_SPLASH" || sMeansOfDeath == "MOD_EXPLOSIVE" )
{
if( self hasperk("specialty_phd" ) )
{
finalDamage = 0;
return;
}
}
}


If a mod could put this in the code format for me that would be great... The button doesn't do any thing when I click it...
Last Edit: December 27, 2016, 01:03:14 pm by Dust
broken avatar :(
×
broken avatar :(
Location: au
Date Registered: 11 July 2014
Last active: 1174 days ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
moinchdog's Groups
moinchdog's Contact & Social Linksmoinchdog
"specialty_phd" is not a perk recognised by the bo3 engine. Use what the previous guy said of "specialty_detectexplosive" as the game will recognise it
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 January 2016
Last active: 1250 days ago
Posts
23
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
OptomusPrime22's Contact & Social Links
"specialty_phd" is not a perk recognised by the bo3 engine. Use what the previous guy said of "specialty_detectexplosive" as the game will recognise it

I used the custom perk tutorial and I thought this is what you would do, natesmith the guy who scripted bananas colada told me this is what it would look like... I guess I could try it though...

EDIT
I'm still getting the same error as before when I take explosive damage... Connection interrupted...

EDIT 2
If I replace the whole thing from the script from the first reply I don't get connection interrupted but I do take explosive damage...
Last Edit: December 11, 2016, 08:09:12 pm by OptomusPrime22
Marked as best answer by OptomusPrime22 on Today at 09:58:42 pm
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 524 days ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
This is my perk script for phd, it prevents explosive damage since thats all I really cared to do for now. The shader doesnt show but have not focused on fixing that however you can spawn a hud elem for now or try to figure it out. In the gsh file you can change the perk machine model and the cost if you want to edit either of those as well. However just download the file and then open it and place the files in the rar file in BO3 Root/usermaps/mapname/scripts/pro_custom you will have to create the pro_custom folder. Then open mapname.gsc and mapname.csc and put this line somewhere at the top
#using scripts\zm\pro_custom\_zm_perk_divetonuke;
then open mapname.zone and add
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsh
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsc
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.csc
[You are not allowed to view external links. Register or Login to see them]
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 January 2016
Last active: 1250 days ago
Posts
23
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
OptomusPrime22's Contact & Social Links
This is my perk script for phd, it prevents explosive damage since thats all I really cared to do for now. The shader doesnt show but have not focused on fixing that however you can spawn a hud elem for now or try to figure it out. In the gsh file you can change the perk machine model and the cost if you want to edit either of those as well. However just download the file and then open it and place the files in the rar file in BO3 Root/usermaps/mapname/scripts/pro_custom you will have to create the pro_custom folder. Then open mapname.gsc and mapname.csc and put this line somewhere at the top
#using scripts\zm\pro_custom\_zm_perk_divetonuke;
then open mapname.zone and add
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsh
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsc
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.csc
[You are not allowed to view external links. Register or Login to see them]

Thanks this is what I was looking for, hopefully I can learn what I was doing wrong with this (:
Last Edit: December 11, 2016, 09:30:58 pm by OptomusPrime22
broken avatar :(
×
broken avatar :(
Location: de-
Date Registered: 18 August 2013
Last active: 698 days ago
Posts
70
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
A lot of HD texture for WaW
×
TheKillerey's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
TheKillerey's Contact & Social LinksTheKillerey
Yeah it was my map "Legacy City" :)
I am using this code to display the shader and disable the shader:
 function give_phd_perk()
{
    if(!self HasPerk(PERK_PHDFLOPPER))
            return undefined;
   
    num = self GetEntityNumber();

    self.hud_phd = NewHudElem();
    self.hud_phd.alignX = "left";
    self.hud_phd.alignY = "bottom";
    self.hud_phd.horzAlign = "left";
    self.hud_phd.vertAlign = "bottom";
    self.hud_phd.foreground = true;
    self.hud_phd.sort = 1;
    self.hud_phd.hidewheninmenu = true;

    x = 86; //how far from the left of the game it should be
    y = -44;//the y value - is up + is down

    y += (-30 * num); //you probably won't need this

    self.hud_phd.x = x; // 2
    self.hud_phd.y = y; // -90

    self.hud_phd.alpha = 1;
    self.hud_phd SetShader(PHD_SHADER, PHD_SHADER_WIDTH, PHD_SHADER_HEIGHT);
    //iprintln ("Hud Enabled");
}

function take_phd_perk( b_pause, str_perk, str_result )
{
self clientfield::set_to_player( "phd_perk", 0);
self.hud_phd Destroy();
//iprintln ("Hud Destroyed");
self.hud_phd = undefined;
self waittill("death");


}

Credit me if your using this :3
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2016
Last active: 1127 days ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Aven's Groups
Aven's Contact & Social Links
I keep getting this error once I have everything set up, I tried tinkering with it but i couldn't find why it wasn't initialized but its probably pretty obvious and I am bad at it

^1ERR(6E) scripts/zm/pro_custom/_zm_perk_divetonuke.gsc (49,1)  : Compiler Internal Error :  Uninitialized local variable 'perk_phdflopper'
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2016
Last active: 1127 days ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Aven's Groups
Aven's Contact & Social Links
oops sorry bout that i fixed it and i dont know how to delete my post sooooo. Anyways I don't know how to get the script to go with my phd model, I have the script_struct and the model its using with the target name as zm_perk_machine and everything else fine. But when I go in game the model resets to speed cola even though i changed the gsh file to match the correct model, and finally when I try to buy the perk it says power must be turned on even when power is on, I can buy other perks but not that. thanks
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 524 days ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
oops sorry bout that i fixed it and i dont know how to delete my post sooooo. Anyways I don't know how to get the script to go with my phd model, I have the script_struct and the model its using with the target name as zm_perk_machine and everything else fine. But when I go in game the model resets to speed cola even though i changed the gsh file to match the correct model, and finally when I try to buy the perk it says power must be turned on even when power is on, I can buy other perks but not that. thanks
Meant to get to this earlier but got distracted with other things but if you havent got it working just download this prefab
[You are not allowed to view external links. Register or Login to see them]
and for changing the model make sure these two get changed
#define DIVETONUKE_MACHINE_DISABLED_MODEL		"p6_zm_al_vending_nuke"
#define DIVETONUKE_MACHINE_ACTIVE_MODEL "p6_zm_al_vending_nuke_on"
If this doesnt work then idk but same prefab I use and works for me but if there is anything else just let me know
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2016
Last active: 1127 days ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Aven's Groups
Aven's Contact & Social Links
Thanks man, will try this, I've tweaked those divetonuke machines already but i guess my struct was setup wrong
broken avatar :(
×
broken avatar :(
Location: gbUnited Kingdom
Date Registered: 18 November 2016
Last active: 38 days ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
Signature
Skrt Skrt.
×
nehpets1999's Groups
nehpets1999's Contact & Social Links@nehpets1999
This is my perk script for phd, it prevents explosive damage since thats all I really cared to do for now. The shader doesnt show but have not focused on fixing that however you can spawn a hud elem for now or try to figure it out. In the gsh file you can change the perk machine model and the cost if you want to edit either of those as well. However just download the file and then open it and place the files in the rar file in BO3 Root/usermaps/mapname/scripts/pro_custom you will have to create the pro_custom folder. Then open mapname.gsc and mapname.csc and put this line somewhere at the top
#using scripts\zm\pro_custom\_zm_perk_divetonuke;
then open mapname.zone and add
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsh
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.gsc
scriptparsetree,scripts/zm/pro_custom/_zm_perk_divetonuke.csc
[You are not allowed to view external links. Register or Login to see them]
This is great, thanks! Any idea on how I can get the perk shader to show?

 

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
Loading ...