UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: ville88 on June 22, 2018, 10:06:31 pm

Title: betty glitch. I do not know how to fix it :-/
Post by: ville88 on June 22, 2018, 10:06:31 pm

Double Post Merge: June 22, 2018, 10:15:32 pm
(Content removed from quote.)
Is this the only problem for me? Or this glitch at all?
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: death_reaper0 on June 23, 2018, 02:23:21 am
dont know why you needed sound effects and and intro...
but it looks like you just gave them to yourself via console, its not going to work. the stuff to set them up only activates when obtained legit. same goes with monkey bombs and maybe Molotovs (dont use them so not sure)

buy them and see if it still happens, if it does your probably not having the script added somewhere
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: ville88 on June 23, 2018, 09:24:10 am
sound effects I added to the video
problem - betty does not kill zombies
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: isaacscott935 on June 23, 2018, 10:12:48 am
sound effects I added to the video
problem - betty does not kill zombies

Did you read what reaper said? Instead of getting the BBs through a console command, buy them off the wall.
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: ville88 on June 23, 2018, 11:03:20 am
I not use the console. this bug is on everyone on the map "verruckt" (betty does not kill zombies)

Title: Re: betty glitch. I do not know how to fix it :-/
Post by: isaacscott935 on June 23, 2018, 11:36:18 am
Then you're probably missing the scripts.
Do you have a cracked version?
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: ville88 on June 23, 2018, 12:25:15 pm
I have a license (no "Steam" version). I also think that the problem is in scripts

Title: Re: betty glitch. I do not know how to fix it :-/
Post by: isaacscott935 on June 23, 2018, 12:29:02 pm
Go to your root\raw\maps and find _zombiemode_betty.gsc.

Open the file in whatever text editor you use and delete everything.

Paste this into it:
[noae]
Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;


/*------------------------------------
BOUNCING BETTY STUFFS -
a rough prototype for now, needs a bit more polish

------------------------------------*/
init()
{
trigs = getentarray("betty_purchase","targetname");
for(i=0; i<trigs.size; i++)
{
model = getent( trigs[i].target, "targetname" );
model hide();
}

array_thread(trigs,::buy_bouncing_betties);
level thread give_betties_after_rounds();
}

buy_bouncing_betties()
{
self.zombie_cost = 1000;
self sethintstring( &"ZOMBIE_BETTY_PURCHASE" );
self setCursorHint( "HINT_NOICON" );

level thread set_betty_visible();
self.betties_triggered = false;

while(1)
{
self waittill("trigger",who);
if( who in_revive_trigger() )
{
continue;
}

if( is_player_valid( who ) )
{

if( who.score >= self.zombie_cost )
{
if(!isDefined(who.has_betties))
{
who.has_betties = 1;
play_sound_at_pos( "purchase", self.origin );

//set the score
who maps\_zombiemode_score::minus_to_player_score( self.zombie_cost );
who thread bouncing_betty_setup();
who thread show_betty_hint("betty_purchased");

// JMA - display the bouncing betties
if( self.betties_triggered == false )
{
model = getent( self.target, "targetname" );
model thread maps\_zombiemode_weapons::weapon_show( who );
self.betties_triggered = true;
}

trigs = getentarray("betty_purchase","targetname");
for(i = 0; i < trigs.size; i++)
{
trigs[i] SetInvisibleToPlayer(who);
}
}
else
{
//who thread show_betty_hint("already_purchased");

}
}
}
}
}

set_betty_visible()
{
players = getplayers();
trigs = getentarray("betty_purchase","targetname");

while(1)
{
for(j = 0; j < players.size; j++)
{
if( !isdefined(players[j].has_betties))
{
for(i = 0; i < trigs.size; i++)
{
trigs[i] SetInvisibleToPlayer(players[j], false);
}
}
}

wait(1);
players = getplayers();
}
}

bouncing_betty_watch()
{
self endon("death");

while(1)
{
self waittill("grenade_fire",betty,weapname);
if(weapname == "mine_bouncing_betty")
{
betty.owner = self;
betty thread betty_think();
self thread betty_death_think();
}
}
}

betty_death_think()
{
self waittill("death");

if(isDefined(self.trigger))
{
self.trigger delete();
}

self delete();

}

bouncing_betty_setup()
{
self thread bouncing_betty_watch();

self giveweapon("mine_bouncing_betty");
self setactionslot(4,"weapon","mine_bouncing_betty");
self setweaponammostock("mine_bouncing_betty",5);
}

betty_think()
{
wait(2);
trigger = spawn("trigger_radius",self.origin,9,80,64);
trigger waittill( "trigger" );
trigger = trigger;
self playsound("betty_activated");
wait(.1);
fake_model = spawn("script_model",self.origin);
fake_model setmodel(self.model);
self hide();
tag_origin = spawn("script_model",self.origin);
tag_origin setmodel("tag_origin");
tag_origin linkto(fake_model);
playfxontag(level._effect["betty_trail"], tag_origin,"tag_origin");
fake_model moveto (fake_model.origin + (0,0,32),.2);
fake_model waittill("movedone");
playfx(level._effect["betty_explode"], fake_model.origin);
earthquake(1, .4, fake_model.origin, 512);

//CHris_P - betties do no damage to the players
zombs = getaispeciesarray("axis");
for(i=0;i<zombs.size;i++)
{
//PI ESM: added a z check so that it doesn't kill zombies up or down one floor
if(zombs[i].origin[2] < fake_model.origin[2] + 80 && zombs[i].origin[2] > fake_model.origin[2] - 80 && DistanceSquared(zombs[i].origin, fake_model.origin) < 200 * 200)
{
zombs[i] thread maps\_zombiemode_spawner::zombie_damage( "MOD_ZOMBIE_BETTY", "none", zombs[i].origin, self.owner );
}
}
//radiusdamage(self.origin,128,1000,75,self.owner);

trigger delete();
fake_model delete();
tag_origin delete();
if( isdefined( self ) )
{
self delete();
}
}

betty_smoke_trail()
{
self.tag_origin = spawn("script_model",self.origin);
self.tag_origin setmodel("tag_origin");
playfxontag(level._effect["betty_trail"],self.tag_origin,"tag_origin");
self.tag_origin moveto(self.tag_origin.origin + (0,0,100),.15);
}

give_betties_after_rounds()
{
while(1)
{
level waittill( "between_round_over" );
{
players = get_players();
for(i=0;i<players.size;i++)
{
if(isDefined(players[i].has_betties))
{
players[i]  giveweapon("mine_bouncing_betty");
players[i]  setactionslot(4,"weapon","mine_bouncing_betty");
players[i]  setweaponammoclip("mine_bouncing_betty",2);
}
}
}
}
}

//betty hint stuff
init_hint_hudelem(x, y, alignX, alignY, fontscale, alpha)
{
self.x = x;
self.y = y;
self.alignX = alignX;
self.alignY = alignY;
self.fontScale = fontScale;
self.alpha = alpha;
self.sort = 20;
//self.font = "objective";
}

setup_client_hintelem()
{
self endon("death");
self endon("disconnect");

if(!isDefined(self.hintelem))
{
self.hintelem = newclienthudelem(self);
}
self.hintelem init_hint_hudelem(320, 220, "center", "bottom", 1.6, 1.0);
}


show_betty_hint(string)
{
self endon("death");
self endon("disconnect");

if(string == "betty_purchased")
text = &"ZOMBIE_BETTY_HOWTO";
else
text = &"ZOMBIE_BETTY_ALREADY_PURCHASED";

self setup_client_hintelem();
self.hintelem setText(text);
wait(3.5);
self.hintelem settext("");
}
[/noae]
Title: Re: betty glitch. I do not know how to fix it :-/
Post by: ville88 on June 23, 2018, 12:36:16 pm
For "verruckt" need go to root/raw/maps/mapname.gsc and find function but i understand you and i'll be try