Game Modding | Call of Duty: Black Ops 3 | General Discussion
ModmeBot:
Thread By: simplyzak09
Hi,
So I'm making a troll EE for a youtube I like to watch (NGT :P) for my wip map,
I'm using the script below, to target that youtube so if they ever play the map and activate this trigger, a little troll Easter Egg will begin. While any other player who comes across the EE it'll display a message saying "sorry this isn't for you".
In short, the troll goes, If that player activates the trigger, it looks like there are buying that gun (takes points and plays sound) but they will get teleported into a secret room with a reference to some of their youtube content, a message pops up to say "now this is where the fun begins" -troll starts. they get teleported back and are forced to only crouch for 5 minutes before teasing them about the kill command (Don't know if you can kill players through script, but they won't know that :P) but then standing and prone get re-enabled and are rewarded with a mark 2 -(it really doesn't matter game balance wise forgiven them a mark 2 coz they'll would have finished the main EE before they can access this one)
credit to Mathfag for above script
so far this is what I've come up with
and I'm getting this error with it, not even sure if this will work tbh
any help would be greatly appreciated
ModmeBot:
Reply By: DTZxPorter
simplyzak09
Hi, ...
ModmeBot:
Reply By: mathfag
simplyzak09
Hi,
ModmeBot:
Reply By: Harry Bo21
self will be the player entity, you need self.playername
ModmeBot:
Reply By: simplyzak09
with the Else If
what value would I need to put in the brackets?
ModmeBot:
Reply By: mathfag
simplyzak09
with the Else If what value would I need to put in the brackets? else if( self== " " )//everyone else who's steam id isn't bob90697
ModmeBot:
Reply By: Harry Bo21
simplyzak09
with the Else If what value would I need to put in the brackets? else if( self== " " )//everyone else who's steam id isn't bob90697
ModmeBot:
Reply By: simplyzak09
update: I'm not getting any more errors with linking the script with the map but the function is only displaying the player's name and not doing anything else :/
ModmeBot:
Reply By: mathfag
simplyzak09
update: I'm not getting any more errors with linking the script with the map but the function is only displaying the player's name and not doing anything else :/ function trollgun() { trigger = GetEnt("Thompson", "targetname"); trigger SetHintString("Press ^3&&1^7 to buy OG Thompson [cost : 1500]."); // Changes the string that shows when looking at the trigger. trigger SetCursorHint("HINT_NOICON"); // Changes the icon that shows when looking at the trigger. { trigger waittill("trigger", player); { foreach(player in getplayers()) { player thread check_name(); } } } } function check_name() { iprintlnbold(self.playername); //the script stops at this if(self.playername == "simplyzak09") { self.playername PlayLocalSound( "cha-ching" ); self.playername zm_score::minus_to_player_score( 1500 ); wait (10); self.playername Teleport(" 56 608 264 "," 0 0 0 ");//teleports player wait (80); self.playername IPrintLnBold("now this is where the fun begins"); wait (10); self.playername Teleport("-384 424 8 "," 0 0 0 ");//teleports player wait (5); self.playername AllowStand( false ); self.playername AllowProne( false ); self.playername IPrintLnBold("sorry about the thompson and enjoy 5 minuites of only crouching :'D "); wait (300); self.playername AllowStand( true ); self.playername AllowProne( true ); wait (10); self.playername IPrintLnBold("a lot worst can happen like level.player kill()"); wait (30); self.playername GiveWeapon( "bo3_mp40" ); self.playername IPrintLnBold("but I won't for now"); } else { self.playername iprintlnbold( "This is not for you" ); } }
ModmeBot:
Reply By: simplyzak09
After a day of breaking and fixing, It's all working fine now other than one thing.
the below code gives the player a weapon but then the Samantha glitch happens because if the player doesn't have mule kick it gives them a third weapon. I may leave it as its meant to be a troll really so it kinda works in my favour. but this code only works if the player has 1 or 2 weapons with mule kick, if the player already has 2 or 3 weapons it will give them the glitch due to the game thinking they are cheating. Just for learning, would anyone know how this would be fixed so it'll replace the weapon the player is holding with the new gun, instead of giving them an extra weapon?
ps. thank you to everyone who helped me write and complete this troll, I'll make sure to credit you all on the steam page to the map I'm working on when it's complete
ModmeBot:
Reply By: simplyzak09
I'm trying to write this extra function, that will check if a specific player is using a specific gun and if so it'll take and replace that gun with another one.
I've gotten this so far but I'm getting errors that make no sense to me, such as expecting semicolon (;) then unexpected semicolon -_-
what do I need to change to get this to work, thanks
ModmeBot:
Reply By: mathfag
simplyzak09
I'm trying to write this extra function, that will check if a specific player is using a specific gun and if so it'll take and replace that gun with another one. I've gotten this so far but I'm getting errors that make no sense to me, such as expecting semicolon (;) then unexpected semicolon -_- what do I need to change to get this to work, thanks function NOTHOMPSON() { foreach(player in getplayers()) { player thread check_name2(); } } function check_name2() { if(self.playername == "simplyzak09") //placeholder name { if( Self HasWeapon("smg_thompson") self TakeWeapon("smg_thompson"); IPrintLnBold("Not for you"); wait (5); weapon = getweapon("bo3_mp40"); self giveweapon(weapon); self switchtoweapon(weapon); } else { self IPrintLnBold("Enjoy your m1927"); } }
ModmeBot:
Reply By: simplyzak09
mathfag
simplyzak09 I'm trying to write this extra function, that will check if a specific player is using a specific gun and if so it'll take and replace that gun with another one. I've gotten this so far but I'm getting errors that make no sense to me, such as expecting semicolon (;) then unexpected semicolon -_- what do I need to change to get this to work, thanks function NOTHOMPSON() { foreach(player in getplayers()) { player thread check_name2(); } } function check_name2() { if(self.playername == "simplyzak09") //placeholder name { if( Self HasWeapon("smg_thompson") self TakeWeapon("smg_thompson"); IPrintLnBold("Not for you"); wait (5); weapon = getweapon("bo3_mp40"); self giveweapon(weapon); self switchtoweapon(weapon); } else { self IPrintLnBold("Enjoy your m1927"); } } None of this will give you a semicolon error. Check the line number on the launcher. Also if( Self HasWeapon("smg_thompson") won't work because you need brackets under it. (It will skip it if you don't put what you want to happen in brackets)
ModmeBot:
Reply By: mathfag
Check a few lines before line 1186 for missing semicolons. The launcher is not always acurate
ModmeBot:
Reply By: Harry Bo21
self - not Self
ModmeBot:
Reply By: Harry Bo21
your also missing a close bracket
if ( self hasWeapon( "smg_thompson" ) )
ModmeBot:
Reply By: mathfag
I just noticed it now on harrys post
you have
you need 1 more bracket
ModmeBot:
Reply By: Harry Bo21
mathfag
I just noticed it now on harrys post you have if( Self HasWeapon("smg_thompson") you need 1 more bracket if( Self HasWeapon("smg_thompson"))