SmileModding help pls

Posts 1–9 of 9 · Page 1 of 1
Modding help pls
Can soneone PLS add me the running animation pls?! i tryed it 5 days long and it not works ^^ im to stupid for this i dont know if i must add it in -bot.gsc or _botutil.gsc so i post both need help pls !
thx guys

PS: i need the running "zombies" only on Quarry

_bot.gsc:

Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include AImod\_multi;
#include AImod\_OtherFunctions;


BotMain()
{

CreateBotWave( );

}

CreateBotWave( )
{
level endon("game_ended");

level.Wave++;
level.BotsForWave = (25 * level.Wave);
level.RealSpawnedBots = 0;
level.zState = "playing";

level thread ZombieMarkers();

level notify("crate_gone");

	foreach( player in level.players )
	{
		player iPrintLnBold("Total " + level.BotsForWave + " Zombies in Wave");
		player PlayLocalSound("flag_spawned");
	}

	for( i = 0; i < level.BotsForWave; i++ )
	{
		while(AImod\_botUtil::ZombieCount() >= 25)//prevent massive lag [increase if u have a good computer]
			wait 1;

		if(level.RealSpawnedBots < level.BotsForWave)
			level.RealSpawnedBots++;
	
		level.bots[i] = spawn("script_model", AImod\_botUtil::GetMapSpawnPoint());
		level.bots[i] setModel(AImod\_botUtil::GetSpawnModel());
		
		level.bots[i].crate1 = spawn("script_model", level.bots[i].origin + (0,0,30) ); 
		level.bots[i].crate1 setModel("com_plasticcase_enemy");
		level.bots[i].crate1 Solid();
		level.bots[i].crate1 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
		level.bots[i].crate1.angles = (90,0,0);
		level.bots[i].crate1 hide();
		level.bots[i].crate1.team = "axis";
		level.bots[i].crate1.name = "botCrate" + i;
		level.bots[i].crate1 setCanDamage(true);
	if(level.Waves == 10)
	{
		level.bots[i].crate1.maxhealth = 105;
		level.bots[i].crate1.health = 105;
                    }
else {
		level.bots[i].crate1.maxhealth = level.ZombieHealth;
		level.bots[i].crate1.health = level.ZombieHealth;
}
		level.bots[i].crate1 linkto( level.bots[i] );

		level.bots[i].hasMarker = false;
		level.bots[i].team = "axis";
		level.bots[i].name = "bot" + i;
		level.bots[i].targetname = "bot";
		level.bots[i].classname = "bot";
		level.bots[i].currentsurface = "default";
		level.bots[i].kills = 0;
		level.bots[i] Solid();
		level.bots[i] thread MonitorAttackPlayers( );
		level.bots[i] thread MonitorBotHealth();
		level.bots[i] thread KillIfUnderMap( i );
		level.bots[i] thread ClampToGround();
		level.bots[i] thread GetBestPlayerAndMoveTo();

		wait 0.3;
	}
	
	level thread MonitorFinish();
}

MonitorFinish( )
{
level endon("crate_gone");

for(;;)
{

	if(AImod\_botUtil::ZombieCount() <= 0 && level.Wave < level.MaxWaves)
	{
		level.zState = "intermission";
	
		wait 2;
	
		foreach( player in level.players )
			if(isDefined( player.needsToSpawn ) && player.needsToSpawn)
			{
				player notify("respawn");

				player thread [[level.SpawnClient]]();
				player allowSpectateTeam( "freelook", false );
				
				player.pers["botKillstreak"] = 0;
				player.pers["lastKillstreak"] = "";
				
				player clearLowerMessage("spawn_info");
			}
			
		Announcement( "Ammo Drop Incoming" );
	
		level AImod\_airdrop::C130FlyBy();
		
		level notify("round_ended");

	break;
	}

	else if(AImod\_botUtil::ZombieCount() <= 0 && level.Wave >= level.MaxWaves)
	{
		centerHeight = self AImod\_airdrop::getFlyHeightOffset( level.mapCenter );
		centerCrate = spawn( "script_model", level.mapCenter + (0, 0, centerHeight) );
		centerCrate setModel( "com_plasticcase_friendly" );
		centerCrate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
		centerCrate.angles = (90,0,0);
		centerCrate hide();
	
		foreach( player in level.players )
		{
			player hide();
			player setOrigin( level.mapCenter + (0, 0, centerHeight) );
			player disableWeapons(true);
		}

		wait 5;
		
		foreach( player in level.players )
		{
			player freezeControls(true);
			
			if(isDefined(player.healthword))
				player.healthword destroy();

			if(isDefined(player.healthnum))
				player.healthnum destroy();

			if(isDefined(player.healthbar))
				player.healthbar destroy();

			if(isDefined(player.healthbarback))
				player.healthbarback destroy();

			if(isDefined(player.healthwarning))
				player.healthwarning destroy();
				
			if(isDefined(player.nvText))
				player.nvText destroy();
		
			if(isDefined(player.nvText2))
				player.nvText2 destroy();
		}
		
		level thread maps\mp\killstreaks\_nuke::doNuke( 0 );
		
	break;
	}
	
wait 0.05;
}
}

MonitorBotHealth( )
{
pTemp = "";

	for(;;)
	{

		self.crate1 waittill("damage", eInflictor, attacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime);

		attacker thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback(sHitLoc);
			self.crate1.health -= iDamage;
		
		if( (self.crate1.health <= 0) && (self.name != pTemp) )
		{
			self notify("bot_death");
			self.crate1 notify("bot_death");

			self killEnt(self, 0);
			self.crate1 killEnt(self.crate1, 0);

			if(isDefined(attacker.usingUAV) && attacker.usingUAV)
				attacker PlayLocalSound( maps\mp\gametypes\_teams::getTeamVoicePrefix( attacker.team ) + "ac130_fco_rightontarget" );
			
			attacker thread multikill();

			attacker thread maps\mp\gametypes\_rank::scorePopup( 200, 0, (0,0,1), 1 );
			attacker.kills++;
			attacker.pers["kills"] = attacker.kills;
			attacker.score += 200;
			attacker.pers["score"] = attacker.score;
			attacker.pers["botKillstreak"]++;

			pTemp = self.name;
			break;
		}
		
		if(isDefined(attacker.usingUAV) && attacker.usingUAV)
			attacker PlayLocalSound( maps\mp\gametypes\_teams::getTeamVoicePrefix( attacker.team ) + "ac130_fco_thatsahit" );

	wait 0.05;
	}
}

GetBestPlayerAndMoveTo( )
{
self endon("bot_death");

	for(;;)
	{
		TmpDist = 999999999;
		pTarget = undefined;

		foreach( player in level.players )
		{	
			if(!isAlive(player))
                continue;
				
			if(level.teamBased && self.team == player.pers["team"])
                continue;
				
			if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) )
                continue;
				
			if(player.sessionstate != "playing")
				continue;
				
			if(distancesquared(self.origin, player.origin) < TmpDist)
			{
				TmpDist = distancesquared(self.origin, player.origin);
				pTarget = player;
			}
		}

		movetoLoc = VectorToAngles( pTarget getTagOrigin("j_head") - self getTagOrigin( "j_head" ) );
		self.angles = (0, movetoLoc[1], 0);
		
		self MoveTo(pTarget.origin, (distance(self.origin, pTarget.origin) / 200));
		//self MoveTo(pTarget.origin, (distancesquared(self.origin, pTarget.origin) / 40000));
		
	wait 0.08;
	}

}

MonitorAttackPlayers( )
{
self endon("bot_death");

	for(;;)
	{
		foreach( player in level.players )
		{
			if(distancesquared(player.origin, self.origin) <= 729)
			{
				earthquake(0.7,1, self.origin + (0,0,40), 60);
				player.health--;

				if(player.health <= 40)
				{
					player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( self, self, 999999, 0, "MOD_MELEE", "none", player.origin, player.origin, "none", 0, 0 );
					self.kills++;
				}
			}
		}

	wait 0.07;
	}

}

ClampToGround()
{
	self endon("bot_death");
	self endon("crate_gone");

	while(1)
	{
			trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, self);
			if(isdefined(trace["entity"]) && isDefined(trace["entity"].targetname) && trace["entity"].targetname == "bot")
				trace = bulletTrace(self.origin + (0,0,50), self.origin + (0,0,-40), false, trace["entity"]);

			self.origin = (trace["position"]);
			self.currentsurface = trace["surfacetype"];
			if(self.currentsurface == "none")
				self.currentsurface = "default";

		wait .5;
	}
}

KillIfUnderMap( )
{
self endon("bot_death");

	for(;;)
	{
		if((self.origin[2] < 2000) && (getDvar("mapname") == "mp_highrise"))
		{

			self KillEnt(self, 0);
			self notify("bot_death");
			
		break;
		}
		
	wait 0.05;
	}
}

ZombieMarkers()
{

for(;;)
{
	if(AImod\_botUtil::ZombieCount() <= level.BotsForIcons && level.RealSpawnedBots > level.BotsForIcons)
		for(i = 0; i < level.BotsForWave; i++)
		{
			if((isDefined(level.bots[i])) && (isDefined(level.bots[i].crate1.health)) && (level.bots[i].crate1.health > 0) && (!level.bots[i].hasMarker))
			{
				if ( isdefined( self.lastDeathIcon ) )
					level.bots[i].lastDeathIcon destroy();
	
				newdeathicon = newHudElem();
				newdeathicon.x = level.bots[i].origin[0];
				newdeathicon.y = level.bots[i].origin[1];
				newdeathicon.z = level.bots[i].origin[2] + 54;
				newdeathicon.alpha = .61;
				newdeathicon.archived = true;
				newdeathicon setShader("headicon_dead", 5, 5);
				newdeathicon setwaypoint( true, false );
	
				level.bots[i].lastDeathIcon = newdeathicon;
				level.bots[i].hasMarker = true;
				level.bots[i] thread MoveIcon(level.bots[i].lastDeathIcon);
				level.bots[i] thread BotDestroyOnDeath(level.bots[i].lastDeathIcon);
			}
		}
		
	else if(AImod\_botUtil::ZombieCount() > level.BotsForIcons)
		for(i = 0; i < level.BotsForWave; i++)
		{
			if((isDefined(level.bots[i])) && (isDefined(level.bots[i].crate1.health)) && (level.bots[i].crate1.health > 0) && (level.bots[i].hasMarker))
			{
				if ( isdefined( self.lastDeathIcon ) )
					level.bots[i].lastDeathIcon destroy();

				level.bots[i].hasMarker = false;
				level.bots[i] notify("noicon");
			}
		}

wait 0.1;
}

}

MoveIcon(icon)
{
self endon("bot_death");
self endon("noicon");

for(;;)
{
	icon.x = self.origin[0];
	icon.y = self.origin[1];
	icon.z = self.origin[2] + 54;

wait 0.05;
}

}
_botutil.gsc:
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include AImod\_OtherFunctions;

ZombieCount()
{
zombCount = 0;

		for(i = 0; i < level.BotsForWave; i++)
		{
			if((isDefined(level.bots[i])) && (level.bots[i].crate1.health > 0))
				zombCount++;
		}
		
return zombCount;
}

SpawnTrigger(Torigin, gotoOrigin, width, height, map_name)
{
trig = spawn("trigger_radius", Torigin,0,width,height);
trig.goto = gotoOrigin;
trig thread waitfortrig(map_name);
		
return trig;
}

waitfortrig(map_name)
{ 
	while(getdvar("mapname") == map_name)
	{
		self waittill("trigger",player);

		if(player.sessionstate != "playing")
		continue;

		player setOrigin(self.goto);
		player iPrintlnBold("Anti-Glitch");
		
wait 0.05;
	}
}

GetMapSpawnPoint( )
{
Waypoint = undefined;

switch( getDvar("mapname") )
{
	case "mp_afghan":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (3996,2575,2);
		break;
		case 1:
		Waypoint = (2016,1872,0);
		break;
		case 2:
		Waypoint = (461,1124,172);
		break;
		case 3:
		Waypoint = (-609,1272,213);
		break;
		case 4:
		Waypoint = (492,2622,263);
		break;
	}	
	break;

	case "mp_highrise":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-3752,5184,2884);
		break;
		case 1:
		Waypoint = (-2898,7033,2884);
		break;
		case 2:
		Waypoint = (-1843,6413,2836);
		break;
		case 3:
		Waypoint = (-2732,6528,3276);
		break;
		case 4:
		Waypoint = (10,6547,3080);
		break;
	}
	break;
	
	case "mp_quarry":
	switch( randomInt(5) )
	{
		case 0:
		Waypoint = (-2538,4387,203);
		break;
		case 1:
		Waypoint = (-2533,4387,203);
		break;
		case 2:
		Waypoint = (-2528,4387,203);
		break;
		case 3:
		Waypoint = (-2523,4387,203);		
		break;
		case 4:
		Waypoint = (-2518,4387,203);
		break;

	}
	break;
	
	case "mp_brecourt":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-2230,1117,-8);
		break;
		case 1:
		Waypoint = (991,-739,-46);
		break;
		case 2:
		Waypoint = (2457,-2198,60);
		break;
		case 3:
		Waypoint = (1115,-2556,131);
		break;
		case 4:
		Waypoint = (-578,-1714,47);
		break;
	}
	break;

	case "mp_rust":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-453,1156,-221);
		break;
		case 1:
		Waypoint = (1332,1630,-158);
		break;
		case 2:
		Waypoint = (1353,362,-223);
		break;
		case 3:
		Waypoint = (504,483,-33);
		break;
		case 4:
		Waypoint = (-7,195,-263);
		break;
	}
	break;
	
	case "mp_terminal":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (1238,5335,203);
		break;
		case 1:
		Waypoint = (1368,4158,179);
		break;
		case 2:
		Waypoint = (1772,4019,315);
		break;
		case 3:
		Waypoint = (2715,3982,95);
		break;
		case 4:
		Waypoint = (2273,5302,203);
		break;
	}
	break;
	
	case "mp_boneyard":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (3,920,20);
		break;
		case 1:
		Waypoint = (-1551,286,-117);
		break;
		case 2:
		Waypoint = (1991,339,-141);
		break;
		case 3:
		Waypoint = (248,1445,-61);
		break;
		case 4:
		Waypoint = (1177,1113,-46);
		break;
	}
	break;
	
	case "mp_underpass":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (1239,1323,388);
		break;
		case 1:
		Waypoint = (2032,-458,385);
		break;
		case 2:
		Waypoint = (-39,906,189);
		break;
		case 3:
		Waypoint = (286,-139,332);
		break;
		case 4:
		Waypoint = (2691,761,293);
		break;
	}
	break;
	
	case "mp_derail":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-128,-1621,176);
		break;
		case 1:
		Waypoint = (-32,344,106);
		break;
		case 2:
		Waypoint = (928,1669,194);
		break;
		case 3:
		Waypoint = (2056,3018,424);
		break;
		case 4:
		Waypoint = (146,2622,252);
		break;
	}
	break;
	
	case "mp_nightshift":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (855,-1190,3);
		break;
		case 1:
		Waypoint = (-1567,-784,3);
		break;
		case 2:
		Waypoint = (-593,-316,147);
		break;
		case 3:
		Waypoint = (1144,126,3);
		break;
		case 4:
		Waypoint = (-749,-628,7);
		break;
	}
	break;
	
	case "mp_estate":
	switch( randomInt(5) )
	{
		case 0:
		Waypoint = (750.867,1916.87,150.071);
		break;
		case 1:
		Waypoint = (752.354,-399.33,73.4879);
		break;
		case 2:
		Waypoint = (-709.1,-47.408,149.349);
		break;
		case 3:
		Waypoint = (-840.875,682.945,17.7343);
		break;
		case 4:
		Waypoint = (-460.607,1613.52,-5.13542);
		break;
	}

	break;
	
	case "mp_favela":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (82,-87,5);
		break;
		case 1:
		Waypoint = (31,955,311);
		break;
		case 2:
		Waypoint = (357,2302,295);
		break;
		case 3:
		Waypoint = (-900,1153,63);
		break;
		case 4:
		Waypoint = (1242,806,204);
		break;
	}
	break;
	
	case "mp_invasion":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-1629,-2316,268);
		break;
		case 1:
		Waypoint = (270,-1507,291);
		break;
		case 2:
		Waypoint = (-1112,-907,266);
		break;
		case 3:
		Waypoint = (-972,-3227,271);
		break;
		case 4:
		Waypoint = (-1389,-1916,281);
		break;
	}
	break;
	
	case "mp_checkpoint":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (222,-1032,11);
		break;
		case 1:
		Waypoint = (-427,52,251);
		break;
		case 2:
		Waypoint = (1185,805,11);
		break;
		case 3:
		Waypoint = (-23,675,19);
		break;
		case 4:
		Waypoint = (585,297,156);
		break;
	}
	break;
	
	case "mp_subbase":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (-79,-601,99);
		break;
		case 1:
		Waypoint = (-270,-1561,59);
		break;
		case 2:
		Waypoint = (-850,1020,107);
		break;
		case 3:
		Waypoint = (968,512,43);
		break;
		case 4:
		Waypoint = (960,-1232,283);
		break;
	}
	break;
	
	case "mp_rundown":
	switch( randomInt(4) )
	{
		case 0:
		Waypoint = (1206,-2439,208);
		break;
		case 1:
		Waypoint = (-210,-1204,23);
		break;
		case 2:
		Waypoint = (1224,-863,37);
		break;
		case 3:
		Waypoint = (767,699,85);
		break;
		case 4:
		Waypoint = (-1146,340,31);
		break;
	}
	break;
	
}

return Waypoint;
}

GetSpawnModel( )
{
rModel = "";

	switch( getDvar("mapname") )
	{
		case "mp_underpass":
		rModel = "mp_body_militia_smg_aa_wht";
		break;
		
		case "mp_quarry":
		rModel = "mp_body_militia_smg_aa_blk";
		break;
		
		case "mp_afghan":
		rModel = "mp_body_opforce_arab_shotgun_a";
		break;
		
		case "mp_rust":
		rModel = "mp_body_opforce_arab_shotgun_a";
		break;
		
		case "mp_boneyard":
		rModel = "mp_body_opforce_arab_shotgun_a";
		break;
		
		case "mp_derail":
		rModel = "mp_body_opforce_arctic_shotgun_c";
		break;
		
		case "mp_highrise":
		rModel = "mp_body_airborne_shotgun";
		break;
		
		case "mp_terminal":
		rModel = "mp_body_airborne_shotgun";
		break;
		
		case "mp_brecourt":
		rModel = "mp_body_airborne_shotgun_b";
		break;
		
		case "mp_nightshift":
		rModel = "mp_body_airborne_shotgun_c";
		break;
		
		case "mp_estate":
		rModel = "mp_body_airborne_shotgun_c";
		break;
		
		case "mp_favela":
		rModel = "mp_body_militia_smg_aa_blk";
		break;
		
		case "mp_invasion":
		rModel = "mp_body_opforce_arab_shotgun_a";
		break;
		
		case "mp_checkpoint":
		rModel = "mp_body_opforce_arab_shotgun_a";
		break;
		
		case "mp_subbase":
		rModel = "mp_body_opforce_arctic_shotgun_c";
		break;
		
		case "mp_rundown":
		rModel = "mp_body_militia_smg_aa_blk";
		break;
	}

return rModel;
}

SpawnWeapon(weapName, coords, angles)
{
point = spawn("script_origin", coords);
weap = SpawnWeap(weapName, point.origin);

if(isDefined(angles))
weap.angles = angles;

weap linkto( point );

return point;
}

SpawnWeap(weapName, coords)
{
return spawn( "weapon_" + weapName, coords + (0,0,5) );
}
1: No begging.
2: Maybe link the mod your leech? (I know but..)
3: I am almost 90% sure that NO ONE will look on the BUG/HUGE list of codes..
4: We have better things to do.
5: Why arent you pleased with moving....

EDIT:
You looked at :
self MoveTo(pTarget.origin, (distance(self.origin, pTarget.origin) / 200));
You change the RED to a lower number for faster/slower move. (I don't remember that but you try)
It's inside the: _bot.gsc
Quote Originally Posted by Jorndel View Post
1: No begging.
2: Maybe link the mod your leech? (I know but..)
3: I am almost 90% sure that NO ONE will look on the BUG/HUGE list of codes..
4: We have better things to do.
5: Why arent you pleased with moving....

EDIT:
You looked at :

You change the RED to a lower number for faster/slower move. (I don't remember that but you try)
It's inside the: _bot.gsc
maybe u can do it if u see the mod ?! in oma mod zombies are animated and i dont know how to do this should i give youa download link from my mod ?! and on of OMA zombies ?!
No, I won't do the mod for you.

I am just droping by to answer some questions to help out.

So you have to find someone else that want to use their time to help you.
because I won't.

Enjoy your stay and have a great day.
Quote Originally Posted by Jorndel View Post
No, I won't do the mod for you.

I am just droping by to answer some questions to help out.

So you have to find someone else that want to use their time to help you.
because I won't.

Enjoy your stay and have a great day.
thx ;D! noone wants to help me ^^ epic shit ^^
Quote Originally Posted by ghost123456 View Post
thx ;D! noone wants to help me ^^ epic shit ^^
Maybe thats because I guess I gave you the answer on how to speed them up.
And in case you aren't pleased with that....

Try what I told you, its something called search, and I searched for move.
And then I found the MoveTo that is used to make models move to a location/place and with a cerrtian speed.

So instead of making others do it for you.
Start trying things and you might get lucky.
Quote Originally Posted by Jorndel View Post
Maybe thats because I guess I gave you the answer on how to speed them up.
And in case you aren't pleased with that....

Try what I told you, its something called search, and I searched for move.
And then I found the MoveTo that is used to make models move to a location/place and with a cerrtian speed.

So instead of making others do it for you.
Start trying things and you might get lucky.
I sent him 2 days ago a tutorial of how to do animations and he is even asking me how now....
Quote Originally Posted by Yamato View Post
I sent him 2 days ago a tutorial of how to do animations and he is even asking me how now....
Well, I guess he don't know GSC and might have a hard time to to something that he finds hard himself.

Well, Good Luck.
trhx guys i will try it now (like the last 5 days ^^ ! ) .
well, i releas today my first mod so u can have a look at my gsc kills they are not good but also not bad ^^ ! hmm okei , thx guys for helP ^^ <3
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us