You are viewing our Forum Archives. To view or take place in current topics click here.
#581. Posted:
TehMarra
  • TTG Senior
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
xSonic wrote
TTGxPremium wrote I making a menu with xSonic's duel menu base...
I want to have a submenu name customize for example.
But in the Customize submenu I want to have a menu for scrollers, shaders, and text for example.
How would I do this?
I want to know how you can have menus in submenus??


Just make it like the main menu.

But what Im saying is I want submenus with submenus in them!
I dont want the menu to show up on the main menu, I want a seperate menu for
scrollers, text options, shaders, and other stuff in a "customize" menu...
How would I do this?
#582. Posted:
xSonic
  • TTG Senior
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
TTGxPremium wrote
xSonic wrote
TTGxPremium wrote I making a menu with xSonic's duel menu base...
I want to have a submenu name customize for example.
But in the Customize submenu I want to have a menu for scrollers, shaders, and text for example.
How would I do this?
I want to know how you can have menus in submenus??


Just make it like the main menu.

But what Im saying is I want submenus with submenus in them!
I dont want the menu to show up on the main menu, I want a seperate menu for
scrollers, text options, shaders, and other stuff in a "customize" menu...
How would I do this?


Like i said! Make it Like a main menu.

So

Main Menu:

Customisables

Customisables:

Scroller Shader - submenu with shaders inside
Background Color - submenu with shaders inside
Background Shader - submenu with shaders inside
Background Color - submenu with shaders inside

See what i mean by do it like a main menu
#583. Posted:
-Dino
  • V5 Launch
Status: Offline
Joined: Jan 26, 201113Year Member
Posts: 1,512
Reputation Power: 69
Status: Offline
Joined: Jan 26, 201113Year Member
Posts: 1,512
Reputation Power: 69
xSonic wrote
-TTG_Dino- wrote
xSonic wrote
-TTG_Dino- wrote ok heres one for you guys how do i get a custom power up to drop RANDOMLY like regular powerups in the game

Power up code::
credit to -Crippler- of course
PowerUP()
{
   self endon( "disconnect" );
   self endon( "death" );
   {
      self waittill( "weapon_fired" );
      Rise = (0, 0, 40);
      forward = self getTagOrigin("j_head");
      end = self thread vector_scal(anglestoforward(self getPlayerAngles()),800);
      Location = BulletTrace( forward, end, 0, self )[ "position" ];
      dm = spawn( "script_model", Location + Rise );
      dm setModel( GetWeaponModel( "zombie_30cal" ) );
      Playfx( level._effect["lightning_dog_spawn"], dm.origin );
      playsoundatposition( "pre_spawn", dm.origin );
      playsoundatposition( "bolt", dm.origin );
      Earthquake( 0.5, 0.75, dm.origin, 1000);
      PlayRumbleOnPosition("explosion_generic", dm.origin);
      playsoundatposition( "spawn", dm.origin );
      playsoundatposition("spawn_powerup", dm.origin);
      dm thread maps\_zombiemode_powerups::powerup_timeout();
      dm thread maps\_zombiemode_powerups::powerup_wobble();
      dm thread grab();
      wait .1;
   }
}
vector_scal(vec, scale)
{
   vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
   return vec;
}
grab()
{
   self endon ("powerup_timedout");
   self endon ("powerup_grabbed");
   while (isdefined(self))
   {
      players = get_players();
      for (i = 0;i < players.size;i++)
      {
         if (distance (players[i].origin, self.origin) < 64)
         {
            playfx (level._effect["powerup_grabbed"], self.origin);
            playfx (level._effect["powerup_grabbed_wave"], self.origin);
            wait( 0.1 );
            playsoundatposition("powerup_grabbed", self.origin);
            self stoploopsound();
            self delete();
            players[i] thread maps\_createmenu::Death_Machine();
         }
      }
      wait 0.1;
   }
}

DEATH MACHINE
credit to Billy
Death_Machine()
{
   self endon("timer_done");
   self notify("close_menu");
   self thread DMTimer();
   self thread maps\_createcam::take_player_weapons();
   self AllowSprint( false );
   self AllowProne( false );
   self AllowMelee( false );
   self AllowLean( false );
   self AllowAds( false );
   self setClientDvar( "cg_fov", "90" );
   self setClientDvar( "perk_weapSpreadMultiplier", "0.001");
   self setClientDvar( "cg_drawcrosshair", "0" );
   self thread xhair();
   wait 0.01;
   self setMoveSpeedScale( 0.7 );
   self giveWeapon("zombie_30cal");
   self switchtoweapon("zombie_30cal");
   self SetPerk("specialty_rof");
   self SetClientDvar( "perk_weapRateMultiplier", "0.2" );
   self setClientDvar( "player_sustainAmmo", "1" );
}
DMTimer()
{
   self endon("timer_done");
   timerdmtext = self createFontString("objective",3,self);
   timerdmtext setpoint("CENTER","CENTER",0,200);
   timerdmtext setTimer(40);
   self thread destroytime( timerdmtext );
   wait 40;
   self TakeAllWeapons();
   self thread maps\_createcam::giveback_player_weapons();
   self setClientDvar( "perk_weapSpreadMultiplier", "1");
   self SetClientDvar( "perk_weapRateMultiplier", "1" );
   self setClientDvar( "player_sustainAmmo", "0" );
   self setMoveSpeedScale( 1 );
   self AllowLean( true );
   self AllowAds( true );
   self AllowSprint( true );
   self AllowProne( true );
   self AllowMelee( true );
   self setClientDvar( "cg_fov", "75" );
   self setClientDvar( "cg_drawcrosshair", "1" );
   self notify("timer_done");
}
xhair()
{
   crossHair = NewClientHudElem(self);
   crossHair.location = 0;
   crossHair.alignX = "center";
   crossHair.alignY = "middle";
   crossHair.foreground = 1;
   crossHair.fontScale = 1;
   crossHair.sort = 5;
   crossHair.alpha = 1;
   crossHair.x = 320;
   crossHair.y = 239;
   crossHair setText("({o})");
   wait 40;
   crossHair destroy();
}
timerDM()
{
   self endon("timer_done");
   timertext = self createFontString("objective",3);
   timertext setpoint("CENTER","CENTER",0,200);
   timertext setTimer(40);
   self thread destroytime( timertext );
   wait 40;
   self notify("timer_done");
}
destroytime( hudElem )
{
   wait 1;
   self waittill ( "timer_done" );
   hudElem destroy();
}


The coding for that is complex.

You would have to make it so every so many kills it drops.

its easy to make as like a shoot and it appears thing but dropping is way harder.

ok so what would i do to make it drop then after kills i can do waittil("zomb_kill") or whatever


yes but you would need to simultaneously monitor each persons kills and add them to get teh drop rate

so like the monitor lobby kills in all the weapons and then a random amount of kills like lets say 10 - 50
#584. Posted:
xSonic
  • TTG Senior
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
-TTG_Dino- wrote
xSonic wrote
-TTG_Dino- wrote
xSonic wrote
-TTG_Dino- wrote ok heres one for you guys how do i get a custom power up to drop RANDOMLY like regular powerups in the game

Power up code::
credit to -Crippler- of course
PowerUP()
{
   self endon( "disconnect" );
   self endon( "death" );
   {
      self waittill( "weapon_fired" );
      Rise = (0, 0, 40);
      forward = self getTagOrigin("j_head");
      end = self thread vector_scal(anglestoforward(self getPlayerAngles()),800);
      Location = BulletTrace( forward, end, 0, self )[ "position" ];
      dm = spawn( "script_model", Location + Rise );
      dm setModel( GetWeaponModel( "zombie_30cal" ) );
      Playfx( level._effect["lightning_dog_spawn"], dm.origin );
      playsoundatposition( "pre_spawn", dm.origin );
      playsoundatposition( "bolt", dm.origin );
      Earthquake( 0.5, 0.75, dm.origin, 1000);
      PlayRumbleOnPosition("explosion_generic", dm.origin);
      playsoundatposition( "spawn", dm.origin );
      playsoundatposition("spawn_powerup", dm.origin);
      dm thread maps\_zombiemode_powerups::powerup_timeout();
      dm thread maps\_zombiemode_powerups::powerup_wobble();
      dm thread grab();
      wait .1;
   }
}
vector_scal(vec, scale)
{
   vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
   return vec;
}
grab()
{
   self endon ("powerup_timedout");
   self endon ("powerup_grabbed");
   while (isdefined(self))
   {
      players = get_players();
      for (i = 0;i < players.size;i++)
      {
         if (distance (players[i].origin, self.origin) < 64)
         {
            playfx (level._effect["powerup_grabbed"], self.origin);
            playfx (level._effect["powerup_grabbed_wave"], self.origin);
            wait( 0.1 );
            playsoundatposition("powerup_grabbed", self.origin);
            self stoploopsound();
            self delete();
            players[i] thread maps\_createmenu::Death_Machine();
         }
      }
      wait 0.1;
   }
}

DEATH MACHINE
credit to Billy
Death_Machine()
{
   self endon("timer_done");
   self notify("close_menu");
   self thread DMTimer();
   self thread maps\_createcam::take_player_weapons();
   self AllowSprint( false );
   self AllowProne( false );
   self AllowMelee( false );
   self AllowLean( false );
   self AllowAds( false );
   self setClientDvar( "cg_fov", "90" );
   self setClientDvar( "perk_weapSpreadMultiplier", "0.001");
   self setClientDvar( "cg_drawcrosshair", "0" );
   self thread xhair();
   wait 0.01;
   self setMoveSpeedScale( 0.7 );
   self giveWeapon("zombie_30cal");
   self switchtoweapon("zombie_30cal");
   self SetPerk("specialty_rof");
   self SetClientDvar( "perk_weapRateMultiplier", "0.2" );
   self setClientDvar( "player_sustainAmmo", "1" );
}
DMTimer()
{
   self endon("timer_done");
   timerdmtext = self createFontString("objective",3,self);
   timerdmtext setpoint("CENTER","CENTER",0,200);
   timerdmtext setTimer(40);
   self thread destroytime( timerdmtext );
   wait 40;
   self TakeAllWeapons();
   self thread maps\_createcam::giveback_player_weapons();
   self setClientDvar( "perk_weapSpreadMultiplier", "1");
   self SetClientDvar( "perk_weapRateMultiplier", "1" );
   self setClientDvar( "player_sustainAmmo", "0" );
   self setMoveSpeedScale( 1 );
   self AllowLean( true );
   self AllowAds( true );
   self AllowSprint( true );
   self AllowProne( true );
   self AllowMelee( true );
   self setClientDvar( "cg_fov", "75" );
   self setClientDvar( "cg_drawcrosshair", "1" );
   self notify("timer_done");
}
xhair()
{
   crossHair = NewClientHudElem(self);
   crossHair.location = 0;
   crossHair.alignX = "center";
   crossHair.alignY = "middle";
   crossHair.foreground = 1;
   crossHair.fontScale = 1;
   crossHair.sort = 5;
   crossHair.alpha = 1;
   crossHair.x = 320;
   crossHair.y = 239;
   crossHair setText("({o})");
   wait 40;
   crossHair destroy();
}
timerDM()
{
   self endon("timer_done");
   timertext = self createFontString("objective",3);
   timertext setpoint("CENTER","CENTER",0,200);
   timertext setTimer(40);
   self thread destroytime( timertext );
   wait 40;
   self notify("timer_done");
}
destroytime( hudElem )
{
   wait 1;
   self waittill ( "timer_done" );
   hudElem destroy();
}


The coding for that is complex.

You would have to make it so every so many kills it drops.

its easy to make as like a shoot and it appears thing but dropping is way harder.

ok so what would i do to make it drop then after kills i can do waittil("zomb_kill") or whatever


yes but you would need to simultaneously monitor each persons kills and add them to get teh drop rate

so like the monitor lobby kills in all the weapons and then a random amount of kills like lets say 10 - 50


Yeh then detect the zombie you killed and spawn the drop at his origin
#585. Posted:
TehMarra
  • TTG Senior
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
xSonic wrote
TTGxPremium wrote
xSonic wrote
TTGxPremium wrote I making a menu with xSonic's duel menu base...
I want to have a submenu name customize for example.
But in the Customize submenu I want to have a menu for scrollers, shaders, and text for example.
How would I do this?
I want to know how you can have menus in submenus??


Just make it like the main menu.

But what Im saying is I want submenus with submenus in them!
I dont want the menu to show up on the main menu, I want a seperate menu for
scrollers, text options, shaders, and other stuff in a "customize" menu...
How would I do this?


Like i said! Make it Like a main menu.

So

Main Menu:

Customisables

Customisables:

Scroller Shader - submenu with shaders inside
Background Color - submenu with shaders inside
Background Shader - submenu with shaders inside
Background Color - submenu with shaders inside

See what i mean by do it like a main menu

This helps... But still not completly sure?
Can you maybe type it like how it would look in your menu?
Or have a couple pic examples... Im new to this, and It will take me
a while to understand most things
#586. Posted:
xSonic
  • TTG Senior
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
TTGxPremium wrote
xSonic wrote
TTGxPremium wrote
xSonic wrote
TTGxPremium wrote I making a menu with xSonic's duel menu base...
I want to have a submenu name customize for example.
But in the Customize submenu I want to have a menu for scrollers, shaders, and text for example.
How would I do this?
I want to know how you can have menus in submenus??


Just make it like the main menu.

But what Im saying is I want submenus with submenus in them!
I dont want the menu to show up on the main menu, I want a seperate menu for
scrollers, text options, shaders, and other stuff in a "customize" menu...
How would I do this?


Like i said! Make it Like a main menu.

So

Main Menu:

Customisables

Customisables:

Scroller Shader - submenu with shaders inside
Background Color - submenu with shaders inside
Background Shader - submenu with shaders inside
Background Color - submenu with shaders inside

See what i mean by do it like a main menu

This helps... But still not completly sure?
Can you maybe type it like how it would look in your menu?
Or have a couple pic examples... Im new to this, and It will take me
a while to understand most things


na. Im shattered and off to bed. Just make it so from Main menu you thread customization. Then from there you have sub menus inside to take you to shaders and ish. Exact same coding as main menu.
#587. Posted:
-Dino
  • V5 Launch
Status: Offline
Joined: Jan 26, 201113Year Member
Posts: 1,512
Reputation Power: 69
Status: Offline
Joined: Jan 26, 201113Year Member
Posts: 1,512
Reputation Power: 69
xSonic wrote
-TTG_Dino- wrote
xSonic wrote
-TTG_Dino- wrote
xSonic wrote
-TTG_Dino- wrote ok heres one for you guys how do i get a custom power up to drop RANDOMLY like regular powerups in the game

Power up code::
credit to -Crippler- of course
PowerUP()
{
   self endon( "disconnect" );
   self endon( "death" );
   {
      self waittill( "weapon_fired" );
      Rise = (0, 0, 40);
      forward = self getTagOrigin("j_head");
      end = self thread vector_scal(anglestoforward(self getPlayerAngles()),800);
      Location = BulletTrace( forward, end, 0, self )[ "position" ];
      dm = spawn( "script_model", Location + Rise );
      dm setModel( GetWeaponModel( "zombie_30cal" ) );
      Playfx( level._effect["lightning_dog_spawn"], dm.origin );
      playsoundatposition( "pre_spawn", dm.origin );
      playsoundatposition( "bolt", dm.origin );
      Earthquake( 0.5, 0.75, dm.origin, 1000);
      PlayRumbleOnPosition("explosion_generic", dm.origin);
      playsoundatposition( "spawn", dm.origin );
      playsoundatposition("spawn_powerup", dm.origin);
      dm thread maps\_zombiemode_powerups::powerup_timeout();
      dm thread maps\_zombiemode_powerups::powerup_wobble();
      dm thread grab();
      wait .1;
   }
}
vector_scal(vec, scale)
{
   vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
   return vec;
}
grab()
{
   self endon ("powerup_timedout");
   self endon ("powerup_grabbed");
   while (isdefined(self))
   {
      players = get_players();
      for (i = 0;i < players.size;i++)
      {
         if (distance (players[i].origin, self.origin) < 64)
         {
            playfx (level._effect["powerup_grabbed"], self.origin);
            playfx (level._effect["powerup_grabbed_wave"], self.origin);
            wait( 0.1 );
            playsoundatposition("powerup_grabbed", self.origin);
            self stoploopsound();
            self delete();
            players[i] thread maps\_createmenu::Death_Machine();
         }
      }
      wait 0.1;
   }
}

DEATH MACHINE
credit to Billy
Death_Machine()
{
   self endon("timer_done");
   self notify("close_menu");
   self thread DMTimer();
   self thread maps\_createcam::take_player_weapons();
   self AllowSprint( false );
   self AllowProne( false );
   self AllowMelee( false );
   self AllowLean( false );
   self AllowAds( false );
   self setClientDvar( "cg_fov", "90" );
   self setClientDvar( "perk_weapSpreadMultiplier", "0.001");
   self setClientDvar( "cg_drawcrosshair", "0" );
   self thread xhair();
   wait 0.01;
   self setMoveSpeedScale( 0.7 );
   self giveWeapon("zombie_30cal");
   self switchtoweapon("zombie_30cal");
   self SetPerk("specialty_rof");
   self SetClientDvar( "perk_weapRateMultiplier", "0.2" );
   self setClientDvar( "player_sustainAmmo", "1" );
}
DMTimer()
{
   self endon("timer_done");
   timerdmtext = self createFontString("objective",3,self);
   timerdmtext setpoint("CENTER","CENTER",0,200);
   timerdmtext setTimer(40);
   self thread destroytime( timerdmtext );
   wait 40;
   self TakeAllWeapons();
   self thread maps\_createcam::giveback_player_weapons();
   self setClientDvar( "perk_weapSpreadMultiplier", "1");
   self SetClientDvar( "perk_weapRateMultiplier", "1" );
   self setClientDvar( "player_sustainAmmo", "0" );
   self setMoveSpeedScale( 1 );
   self AllowLean( true );
   self AllowAds( true );
   self AllowSprint( true );
   self AllowProne( true );
   self AllowMelee( true );
   self setClientDvar( "cg_fov", "75" );
   self setClientDvar( "cg_drawcrosshair", "1" );
   self notify("timer_done");
}
xhair()
{
   crossHair = NewClientHudElem(self);
   crossHair.location = 0;
   crossHair.alignX = "center";
   crossHair.alignY = "middle";
   crossHair.foreground = 1;
   crossHair.fontScale = 1;
   crossHair.sort = 5;
   crossHair.alpha = 1;
   crossHair.x = 320;
   crossHair.y = 239;
   crossHair setText("({o})");
   wait 40;
   crossHair destroy();
}
timerDM()
{
   self endon("timer_done");
   timertext = self createFontString("objective",3);
   timertext setpoint("CENTER","CENTER",0,200);
   timertext setTimer(40);
   self thread destroytime( timertext );
   wait 40;
   self notify("timer_done");
}
destroytime( hudElem )
{
   wait 1;
   self waittill ( "timer_done" );
   hudElem destroy();
}


The coding for that is complex.

You would have to make it so every so many kills it drops.

its easy to make as like a shoot and it appears thing but dropping is way harder.

ok so what would i do to make it drop then after kills i can do waittil("zomb_kill") or whatever


yes but you would need to simultaneously monitor each persons kills and add them to get teh drop rate

so like the monitor lobby kills in all the weapons and then a random amount of kills like lets say 10 - 50


Yeh then detect the zombie you killed and spawn the drop at his origin

if you have time will you help me make that code please
#588. Posted:
TehMarra
  • TTG Senior
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
Okay, Im using xSonic's Duel Menu base...
I want to know how to thread this the right way...
I threaded it without the cordinates and I did not get syntax errors... But it did not show up! Can someone please reply in a comment exactly how it would look if I added this code to the duel menu base...


//Example self thread WaterGheyser(( 29, -472, -2 ));


WaterGheyser( x )
{
   i = 0;
   self.Shute = spawn( "script_model", x );
   self.Shute setModel("zombie_teleporter_mainframe_ring3");
   self.Shutex = spawn( "script_model", x );
   self.Shutex setModel("zombie_perk_bottle_sleight");
   self thread WaterFxatShute( x );
   while( 1 )
   {
      if( i < 5 )
      {
         if( distance( self.origin, self.Shute.origin ) <= 50){ i++; wait .5; }
         else{ i--; }
         if( i == 1 ) { Earthquake( 0.1, 1, self.origin, 90 ); }
         else if( i == 2 ){ Earthquake( 0.3, 1, self.origin, 90 ); }
         else if( i == 3 ){ Earthquake( 0.5, 1, self.origin, 90 ); }
         else if( i == 4 ){ Earthquake( 0.7, 1, self.origin, 90 ); }
         else if( i == 5 )
         {
            Earthquake( 0.9, 1, self.origin, 90 );
            self thread ShuteFX( x );
            self thread CheckPos();
            self waittill("stop waterfall");
            i = 0;
            wait 1;
         }
         wait .5;
      }
   }
}
CheckPos()
{
   self endon("stop waterfall");
   inUse = 0;
   for(;;)
   {
      if( distance( self.origin, self.Shute.origin ) < 50)
      {
         if( inUse == 0 )
         {
            inUse = 1;
            self EnableHealthShield( true );
            self EnableInvulnerability();
            self setStance( "stand" );
            self.Launcher = spawn( "script_origin", self.Shute.origin );
            self playerlinkto( self.Launcher );
            self.Launcher moveto ( self.Shute.origin + (0,0,1000), 2, 1, 1 );
            self thread CheckPos2();
            self waittill("move_done");
            self unlink();
            self.Launcher delete();
            self unlink();
            self.inUse = 0;
         }
      }
   }
}
CheckPos2()
{
   self endon("endcheck");
   for(;;)
   {
      if( self.origin == self.Shute.origin + (0,0,1000) )
      {
         self notify("move_done");
         self notify("endcheck");
      }
   wait .1;
   }
}
WaterFxatShute( x )
{
   for(;;)
   {
      playfx( level._effect["rise_billow_water"], x );
      wait 1;
   }
}
ShuteFX( x )
{
   for( i=0; i < 8; i++ )
   {
      playfx( level._effect["rise_burst_water"], x );
      playfx( level._effect["rise_burst_water"], x + (0,0,50) );
      playfx( level._effect["rise_burst_water"], x + (0,0,120) );
      playfx( level._effect["rise_burst_water"], x + (0,0,170) );
      wait 1;
   }
   self notify("stop waterfall");
}

[ Register or Signin to view external links. ]
#589. Posted:
xSonic
  • TTG Senior
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
Status: Offline
Joined: Oct 11, 201013Year Member
Posts: 1,789
Reputation Power: 88
TTGxPremium wrote
Okay, Im using xSonic's Duel Menu base...
I want to know how to thread this the right way...
I threaded it without the cordinates and I did not get syntax errors... But it did not show up! Can someone please reply in a comment exactly how it would look if I added this code to the duel menu base...


//Example self thread WaterGheyser(( 29, -472, -2 ));


WaterGheyser( x )
{
   i = 0;
   self.Shute = spawn( "script_model", x );
   self.Shute setModel("zombie_teleporter_mainframe_ring3");
   self.Shutex = spawn( "script_model", x );
   self.Shutex setModel("zombie_perk_bottle_sleight");
   self thread WaterFxatShute( x );
   while( 1 )
   {
      if( i < 5 )
      {
         if( distance( self.origin, self.Shute.origin ) <= 50){ i++; wait .5; }
         else{ i--; }
         if( i == 1 ) { Earthquake( 0.1, 1, self.origin, 90 ); }
         else if( i == 2 ){ Earthquake( 0.3, 1, self.origin, 90 ); }
         else if( i == 3 ){ Earthquake( 0.5, 1, self.origin, 90 ); }
         else if( i == 4 ){ Earthquake( 0.7, 1, self.origin, 90 ); }
         else if( i == 5 )
         {
            Earthquake( 0.9, 1, self.origin, 90 );
            self thread ShuteFX( x );
            self thread CheckPos();
            self waittill("stop waterfall");
            i = 0;
            wait 1;
         }
         wait .5;
      }
   }
}
CheckPos()
{
   self endon("stop waterfall");
   inUse = 0;
   for(;;)
   {
      if( distance( self.origin, self.Shute.origin ) < 50)
      {
         if( inUse == 0 )
         {
            inUse = 1;
            self EnableHealthShield( true );
            self EnableInvulnerability();
            self setStance( "stand" );
            self.Launcher = spawn( "script_origin", self.Shute.origin );
            self playerlinkto( self.Launcher );
            self.Launcher moveto ( self.Shute.origin + (0,0,1000), 2, 1, 1 );
            self thread CheckPos2();
            self waittill("move_done");
            self unlink();
            self.Launcher delete();
            self unlink();
            self.inUse = 0;
         }
      }
   }
}
CheckPos2()
{
   self endon("endcheck");
   for(;;)
   {
      if( self.origin == self.Shute.origin + (0,0,1000) )
      {
         self notify("move_done");
         self notify("endcheck");
      }
   wait .1;
   }
}
WaterFxatShute( x )
{
   for(;;)
   {
      playfx( level._effect["rise_billow_water"], x );
      wait 1;
   }
}
ShuteFX( x )
{
   for( i=0; i < 8; i++ )
   {
      playfx( level._effect["rise_burst_water"], x );
      playfx( level._effect["rise_burst_water"], x + (0,0,50) );
      playfx( level._effect["rise_burst_water"], x + (0,0,120) );
      playfx( level._effect["rise_burst_water"], x + (0,0,170) );
      wait 1;
   }
   self notify("stop waterfall");
}

[ Register or Signin to view external links. ]


Ive answered this already.
#590. Posted:
TehMarra
  • TTG Senior
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
Status: Offline
Joined: May 31, 201113Year Member
Posts: 1,220
Reputation Power: 59
xSonic wrote
TTGxPremium wrote
Okay, Im using xSonic's Duel Menu base...
I want to know how to thread this the right way...
I threaded it without the cordinates and I did not get syntax errors... But it did not show up! Can someone please reply in a comment exactly how it would look if I added this code to the duel menu base...


//Example self thread WaterGheyser(( 29, -472, -2 ));


WaterGheyser( x )
{

Yah, but I didn't know how to thread it? Can you reply with an example how it would look as one of the options in the menu?
Please reply...
   i = 0;
   self.Shute = spawn( "script_model", x );
   self.Shute setModel("zombie_teleporter_mainframe_ring3");
   self.Shutex = spawn( "script_model", x );
   self.Shutex setModel("zombie_perk_bottle_sleight");
   self thread WaterFxatShute( x );
   while( 1 )
   {
      if( i < 5 )
      {
         if( distance( self.origin, self.Shute.origin ) <= 50){ i++; wait .5; }
         else{ i--; }
         if( i == 1 ) { Earthquake( 0.1, 1, self.origin, 90 ); }
         else if( i == 2 ){ Earthquake( 0.3, 1, self.origin, 90 ); }
         else if( i == 3 ){ Earthquake( 0.5, 1, self.origin, 90 ); }
         else if( i == 4 ){ Earthquake( 0.7, 1, self.origin, 90 ); }
         else if( i == 5 )
         {
            Earthquake( 0.9, 1, self.origin, 90 );
            self thread ShuteFX( x );
            self thread CheckPos();
            self waittill("stop waterfall");
            i = 0;
            wait 1;
         }
         wait .5;
      }
   }
}
CheckPos()
{
   self endon("stop waterfall");
   inUse = 0;
   for(;;)
   {
      if( distance( self.origin, self.Shute.origin ) < 50)
      {
         if( inUse == 0 )
         {
            inUse = 1;
            self EnableHealthShield( true );
            self EnableInvulnerability();
            self setStance( "stand" );
            self.Launcher = spawn( "script_origin", self.Shute.origin );
            self playerlinkto( self.Launcher );
            self.Launcher moveto ( self.Shute.origin + (0,0,1000), 2, 1, 1 );
            self thread CheckPos2();
            self waittill("move_done");
            self unlink();
            self.Launcher delete();
            self unlink();
            self.inUse = 0;
         }
      }
   }
}
CheckPos2()
{
   self endon("endcheck");
   for(;;)
   {
      if( self.origin == self.Shute.origin + (0,0,1000) )
      {
         self notify("move_done");
         self notify("endcheck");
      }
   wait .1;
   }
}
WaterFxatShute( x )
{
   for(;;)
   {
      playfx( level._effect["rise_billow_water"], x );
      wait 1;
   }
}
ShuteFX( x )
{
   for( i=0; i < 8; i++ )
   {
      playfx( level._effect["rise_burst_water"], x );
      playfx( level._effect["rise_burst_water"], x + (0,0,50) );
      playfx( level._effect["rise_burst_water"], x + (0,0,120) );
      playfx( level._effect["rise_burst_water"], x + (0,0,170) );
      wait 1;
   }
   self notify("stop waterfall");
}

[ Register or Signin to view external links. ]


Ive answered this already.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.