Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Phil168912

Howdy.

This script will basically turn-off friendly fire.
So watch out for each others thrown grenades and spraying bullets.

 &&

A player will be selected at random who will have a "cure" so to speak. Zombies will ignore that player for X amount of time. This time can be adjust by yourself.
 ( this is ideally for those who want to have a little fun by avoiding zombies & your buddies. )
*** untested but should work ok, ill test tomorrow... or when i get an actual decent nights sleep.***

Simply add-
thread free_for_all_main();
under-
maps\_zombiemode::main();

Then add this to the bottom of your mapname gsc file.
// This function handles player friendly fire.
free_for_all_main()
{
    players = [];
    players = get_players();
    p1 = players[0];
    p2 = players[1];
    p3 = players[2];
    p4 = players[3];
   
    p1.team = "allies";
    p2.team = "tom";
    p3.team = "dick";
    p4.team = "harry";
   
    for(i=0; i<players.size; i++)
    {
        players[i] thread rand_zombie_friendly();
    }
}

// This function handles which player gets temporarily "cured" for X amount of time.  It cycles throughout the whole game so don't worry, everyone will get a turn!
rand_zombie_friendly(players, p1, p2, p3, p4)
{
    // Duration that no one is cured.
    // 1-5mins. adjust as you wish.
    time = [];
    time[0] = 60;
    time[1] = 120;
    time[2] = 180;
    time[3] = 240;
    time[4] = 300;
   
    // How long a player is cured for.
    // 1-5mins. adjust as you wish.
    is_cured_time = [];
    is_cured_time[0] = 60;
    is_cured_time[1] = 120;
    is_cured_time[2] = 180;
    is_cured_time[3] = 240;
    is_cured_time[4] = 300;
   
    while(1)
    {
        wait(time[randomInt(time.size)]);
        player = randomInt(players.size);
        player.ignoreme = true; //means they wont attack you
        player.is_zombie = true; //means they stop following you
        player.team = "axis"; //axis is zombies
       
        wait(is_cured_time[randomInt(is_cured_time.size)]);
        player.ignoreme = false;
        player.is_zombie = false;
        if(player == p1)
            player.team = "allies";
        else if(player == p2)
            player.team = "tom";
        else if(player == p3)
            player.team = "dick";
        else if(player == p4)
            player.team = "harry";
    }
}
Build mod.
Have fun.
Credits:
TheRevenantSkull - for pointing out teams to me.
1 day ago
theres way too many questions needed to be answered when trying to follow this mess
18 days ago
download file is no longer available
22 days ago
this isnt working for me
31 days ago
anyone know how to get the dog sounds to work?

the start round sounds work but no actual dog sounds

Thanks
49 days ago
you could have 

all_items_acquired = 0;

and then when a item is picked up do-
all_items_acquired = all_items_acquired + 1;

2nd item-
all_items_acquired  = all_items_acquired  + 1;

3rd item-
all_items_acquired  = all_items_acquired  + 1;

then you could do-

if(all_items_acquired == 3)
{
    //place the non_buyable perk trigs here
    //when true, triggers should auto trigger therefor giving the player each of the perks without going up to the perk machines

    revive_trig = getent("w.e the revive trig is called(can be found in _zombiemode_perks. probs zm_perks in bo3)", "targetname")
    revive trig waittill ("trigger", player);

    //then same for other trigs
}


something like that. should be fairly easy

add a wait 2; or something between each trig. otherwise itll try and give all perks at same time and probs crash
71 days ago
so the script i want the light control to go in works pretty much like this-

```
whatever = 0;
while(1)
{
    if(whatever > 0)
    {
        whatever--;
        //light "on" code here
    }
    if(whatever == 0)
    {
        //light off code here
    }
    wait .5;
}
```

i put the above example of how my script works so you can see that adding a trigger to the light is no good. (least i think thats the case anyway).

any help would be appreciate.

Thanks

i solved this myself. if you want to know how just hit me up on ugx waw discord [email protected]
76 days ago
I'm looking to spawn a powerup (either by script_struct or otherwise) using scripts when a trigger is pressed.

EDIT:
I have done a little digging into stock scripts and I have come up with this(i have also put it into it's own file as well).

One big issue I have is that the flags will be set (i have pushed to two buttons) but it won't let me hit the main switch and it doesn't update the hint string to the next part (still using &"ZOMBIE_HALTED" as if they buttons are not pushed.

The better half can't figure it out and she is a devop dev so i came here.
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode_zone_manager;
#include maps\_music;
#include maps\dlc3_code;
#include maps\dlc3_teleporter;

main()
{

    flag_init("trigger1_door_activated");
    flag_init("trigger2_door_activated");
    thread secret_trigger_1();
    thread secret_trigger_2();
    thread secret_door();
}

Secret_trigger_1()
{
    trigger1_cost = 3000;
    trig1 = getEnt("secret_trigger","targetname");
    trig1 SetCursorHint( "HINT_NOICON" );
    trig1 setHintString("Turn On Power First To Resume Powerup");
    flag_wait("electricity_on");
    trig1 setHintString("Press and hold &&1 To Resume Powerup of System (1 of 2) [" + trigger1_cost + "]");
    trig1 waittill("trigger", player );
    if( player.score >= trigger1_cost )
        player maps\_zombiemode_score::minus_to_player_score( trigger1_cost );
    flag_set("trigger1_door_activated");
    trig1 delete();
}

Secret_trigger_2()
{
    trigger2_cost = 3000;
    trig2 = getEnt("secret_trigger2","targetname");
    trig2 SetCursorHint( "HINT_NOICON" );
    trig2 setHintString("Turn On power First To Resume Powerup");
    flag_wait("electricity_on");
    trig2 setHintString("Press and hold &&1 To Resume Powerup of System (1 of 2) [" + trigger2_cost + "]");
    trig2 waittill("trigger", player );
    if( player.score >= trigger2_cost )
        player maps\_zombiemode_score::minus_to_player_score( trigger2_cost );
    flag_set("trigger2_door_activated");
    trig2 delete();
}

secret_door()
{
    door = getEnt("secret_door","targetname");
    door SetCursorHint( "HINT_NOICON" );
    door setHintString("Must Turn On power First");
    flag_wait("electricity_on");
    door setHintString(&"ZOMBIE_HALTED");
    flag_wait("trigger1_door_activated");
    flag_wait("trigger2_door_activated");
    door setHintString(&"ZOMBIE_RE");
    door waittill("trigger", player );
    door setHintString(&"ZOMBIE_WAIT");
    wait 10;
    players = get_players();
    for( i = 0; i < players.size; i++ )
    {
    players[i] playsound("door_slide_open");
    }
    door setHintString(&"ZOMBIE_MA");
    door waittill("trigger", player );
    players = get_players();
    for ( i = 0; i < players.size; i++ )
    {
        primaryWeapons = players[i] GetWeaponsList();
        players[i] playsound( "full_ammo" );

            for( x = 0; x < primaryWeapons.size; x++ )
            {

                players[i] GiveMaxAmmo( primaryWeapons[x] );
            }

    }
    door delete();
}
 you could just make max ammo a wall buyable
i found code online a while ago where it spawn a max ammo but once its gone (picked up, or dissappears if not picked up. like normal) its gone. i havent figured out how to keep it there permanently until picked up. so i created a max ammo wall buyable
89 days ago
if i get it working will make a video, but is anyone got it working?

Double Post Merge: October 09, 2016, 06:19:25 pm

i got it working, im recording tutorial will be up in a few min

Double Post Merge: October 09, 2016, 07:00:22 pm

heres the video http://www.youtube.com/watch?v=PKDWNyUeNws
 this if for bo3. anything for waw?

EDIT: actually dw
97 days ago
There is a tutorial on custom perks here, just look for it. In that tutorial it walks you through making your own custom perk shaders, just follow that part. Its really easy and its the same process no matter what you're using the shaders for - jumpscares, perk shaders, parts etc.
 hey do u know how this can be implemented into waw?
98 days ago
Some of the options I used in KC mod:

	screen_text = NewClientHudElem( self ); 
screen_text.alignX = "center";
screen_text.alignY = "middle";
screen_text.horzAlign = "user_center";
screen_text.vertAlign = "user_bottom";
screen_text.foreground = true;
screen_text.font = "default";
screen_text.fontScale = 1.8;
screen_text.alpha = 0;
screen_text.color = ( 1.0, 1.0, 1.0 );
screen_text SetText(defined_text);
screen_text.y = -113;
screen_text FadeOverTime(1);
screen_text ScaleOverTime(2, 0, 0);
screen_text delete();
ScaleOverTime seems to only work for shaders btw, if you are thinking of using this for text. But if its for icon like you have defined, then its all fine
Edit: Just saw bottom bit, lol. Change setText to setShader
 hey do u know a good waw tut on how i can either get an image or text added to the hud?
99 days ago
player health [SOLVED]
power off [SOLVED]
Looping scripts side-by-side = thread
99 days ago
Solved by HitmanVere informing me that the variable needs to be a global one which is done by either "level or self". i went with level i.e level.bank = 0; & it worked.

deposit()
{
   bank = 0;

   deposit_trig = getEnt("deposit", "targetname");
   deposit_trig setCursorHint("HINT_NOICON");
   deposit_trig setHintString("deposit");

   while ( true )
   {
      deposit_trig waittill("trigger", player);

      if(bank < 10000)
      {
         if(player.score >= 100)
         {
            player maps\_zombiemode_score::minus_to_player_score( 100 );
            iPrintLnBold("100 deposited");
         }
      }
      wait .5;
   }
   return bank; //most likely using this wrong
   thread withdraw();

   // I use the trigger once & the bank value has now gone from 0, to 100 for example.
}

   //So...

withdraw()
{
   // How do i define 'bank' in this function with its newly updated value, being which is '100'.

   depositbank = ::deposit; //most likely using this wrong
   [[depositbank]](bank); //most likely using this wrong

   withdrawal_trig = getEnt("withdrawal_trig", "targetname");
   withdrawal_trig setCursorHint("HINT_NOICON");
   withdrawal_trig setHintString("withdrawal");

   while ( true )
   {
      withdrawal_trig waittill("trigger", player);

      if(bank >= 100) //Coz i get 'uninitialised variable for 'bank' on this line.
      {
         player maps\_zombiemode_score::add_to_player_score( 100 );
         iPrintLnBold("100 withdrawn");
      }
   }
}

Double Post Merge: January 02, 2021, 11:16:54 am

so i tried this approach and hit another snag yet again;
& id still like to know "how to get a variables value from another function".

EDIT: **for anyone reading this who may want a simple bank script then the below code works by adding ' level. ' to all the bank var info.
in radiant theres 3 triggers. 1 trig_use & 2 trig_damage. give the 2 dmg ones the same targetname & then give each 1 of the 2 their own script_noteworthy kvp i.e 
script_noteworthy
melee
&
script_noteworthy
pistol
these are what i called my trig anyway. and if u do use this damage trig approach then dont forget to check the boxes on the trigger entity window.
fior melee check all boxes apart from melee & for pistol all boxes apart from pistol.

bank()
{
    trig = getEnt("bank_trig", "targetname");
    trig setHintString("Press X to initiate");
    trig setCursorHint("HINT_NOICON");
    
    trig waittill ("trigger", player);
    trig setHintString("'Shoot' to [deposit 100], OR 'Melee' to [withdraw 100]");
    
    bank_trigs = getEntArray("bank_trigs", "targetname");
    for(i = 0; i < bank_trigs.size; i++)
    {
        bank_trigs
 thread bank_sys();
    }
}

bank_sys()
{
    trig = getEnt("bank_trig", "targetname");
    bank = 0;
        
    for(;; )
    {        
        self waittill("trigger", player);
    
        if(bank < 400)
        {
            
            if (self.script_noteworthy == "pistol") // deposit
            {
                if(player.score >= 100)
                {
                    player maps\_zombiemode_score::minus_to_player_score( 100 );
                    bank = bank + 100;
                    iPrintLnBold("100 deposited");
                }
                    
                else
                {
                    iPrintLnBold("earn some mulla before trying to deposit fool!");
                }
            }
                        
            else if (self.script_noteworthy == "melee") // withdraw
            {
                if(bank >= 100)
                {
                    player maps\_zombiemode_score::add_to_player_score( 100 );
                    bank = bank - 100;
                    iPrintLnBold("100 withdrawn");
                }
                
                else
                {
                    iPrintLnBold("You aint got enough in the bank sonny!"); 
                }
            }
        }
        
        else
        {
            iPrintLnBold("Cant deposit anymore you rich fuck");
        }
        
    wait 0.5;
    }    
}
100 days ago
In this tutorial I will go over porting a Black Ops 3 Gun to WaW with old viewhands. Many people were having issues so I made this, it took a while to make :P Hope it works for you.

Note: This is not intended for beginners in the slightest, it is intended for those who have an idea of porting. However you should be able to comprehend what's going on hopefully. :P


 great! 2 tutorials on porting bo3 weapons to waw & Both using autodesk. what about folks that dont have maya? a blender tutorial wouldve been better.
100 days ago
2018 and people still porting COD4 into WaW and they sill don't know that we can get them with a single click lol
 how do we get them with a single click then?
101 days ago

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