Modme

New Modme platform coming soon!
Help with Troll mini EE
Viewed 147 time(s)
Topic created on 1507654614
Original post
Modme User
0 wins

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)

 

foreach(player in getplayers())
{
player thread check_name();
}



function check_name()
{
iprintlnbold(self); //prints the player steam name
if(self == "insert username here")
{
do stuff
}


}

 credit to Mathfag for above script 

 

so far this is what I've come up with 

 

thread trollgun();

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); //prints the player steam name
if(self == "bob6907") //placeholder name
{
trigger PlayLocalSound( "cha-ching" );
	  player zm_score::minus_to_player_score( 1500 )
	  
wait (10);	  

self ForceTeleport( 56 608 264, 0 0 0 )//teleports player

wait (80);

IPrintLnBold("now this is where the fun begins");

wait (10);

self ForceTeleport( -384 424 8, 0 0 0 )//teleports player

wait (5);

player AllowStand( false )
player AllowProne( false )

IPrintLnBold("sorry about the Thompson, But hope you enjoy 5 minutes of only crouching :'D ");

wait (300);

player AllowStand( true )
player AllowProne( true )
self SetWeaponAmmoClip( weapon, 0 )

wait (10);

IPrintLnBold("a lot worst can happen like level.player kill()");

wait (30);

e_player GiveWeapon( bo3_mark2 )

IPrintLnBold("but I won't for now");
}
else if( self== " " )//don't know what to put here its for everyone else who's steam id isn't bob6907
{
        iprintlnbold( "This is not for you" );
    }
}

 

 

and I'm getting this error with it, not even sure if this will work tbh 

 

^1wait
^1---^
^1ERR(0) scripts/zm/zm_busdepot2.gsc (932,4) in "check_name()" : syntax error, unexpected TOKEN_WAIT : wait 

 

any help would be greatly appreciated 


Maps created

Containment- finished
Das Haus- finished
Reimagined map- WIP
Reply #1 on 1507655189
Modme Founder
125 wins

simplyzak09

Hi, ...

 Missing a semicolon before the wait:

 

player zm_score::minus_to_player_score( 1500 ) <-----------------

-- Wraith Initialized -- (I don't answer support PMs!)
Reply #2 on 1507728264
Modme User
26 wins

simplyzak09

Hi,     

 You need a semicolon ; after every "command" (after you tell it to do something except for checking (if, else....))

So add it to forceteleport, allowstand...

 

Also do player iprintlnbold() or self iprintlnbold() so it only shows for that player instead of everyone


I've tried nothing and I'm out of ideas.
My creations:
DE gate trap
Debug (on/off)
Jukebox
Gum Anti-cheat
Kino box locator
Panzer Soldat - PM if your map is worth it
Reply #3 on 1507732242
Modme User
99 wins

self will be the player entity, you need self.playername


HarryBo21's BO3 Perks v1.5.0
LINK TO MODME POST
HarryBo21's WAW Perks v5.2.0
LINK TO MODME POST
Black Ops 3 Gun Pack v1.5.0
LINK TO MODME POST
Reply #4 on 1507737716
Modme User
0 wins

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

Maps created

Containment- finished
Das Haus- finished
Reimagined map- WIP
Reply #5 on 1507751848
Modme User
26 wins

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

 just

else
{

}

 

you dont need else if()


I've tried nothing and I'm out of ideas.
My creations:
DE gate trap
Debug (on/off)
Jukebox
Gum Anti-cheat
Kino box locator
Panzer Soldat - PM if your map is worth it
Reply #6 on 1507837940
Modme User
99 wins

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

 still wont work and ive already said why

 

if ( self.playername == "" )


HarryBo21's BO3 Perks v1.5.0
LINK TO MODME POST
HarryBo21's WAW Perks v5.2.0
LINK TO MODME POST
Black Ops 3 Gun Pack v1.5.0
LINK TO MODME POST
Reply #7 on 1507929396
Modme User
0 wins

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" );
    }
}

Maps created

Containment- finished
Das Haus- finished
Reimagined map- WIP
Reply #8 on 1507960888
Modme User
26 wins

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" ); } }

 self is the entity, self.playername or self.name is the entities name.

 

it's self iprintlnbold() and self teleport()

 

also idk if teleport() will work. Use setorigin() and setangles()


I've tried nothing and I'm out of ideas.
My creations:
DE gate trap
Debug (on/off)
Jukebox
Gum Anti-cheat
Kino box locator
Panzer Soldat - PM if your map is worth it
Reply #9 on 1508012309
Modme User
0 wins

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?

 

self IPrintLnBold("Ok here comes your Thompson");

wait (10);

weapon = getweapon("bo3_mp40");
    self giveweapon(weapon);
self IPrintLnBold("Thompson is out of stock, have an MP40 instead");

 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 


Maps created

Containment- finished
Das Haus- finished
Reimagined map- WIP