Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 28 Guests
Online:

LATEST FORUM THREADS

»
Gaming
Q4 General
eXtreme+ v2.9
CoDBO Map + Mod Releases
map loading error
CoD2 MP Mapping
Good Servers on PC
CoDBO General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Normal bubble :(
twix90
General Member
Since: Jan 16, 2012
Posts: 15
Last: Apr 28, 2013
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Jan. 16, 2012 12:21 pm
Hi everyone! :) I have script for bubble, but not work ;( please help me. I tried with dobiry script, but reflects the shots and grenades. I need just normal bubble :)
PS: Sorry for my bad english. I see problem with: line 28;
for( time = 1; time 800; time++ )

Code:
plant_bubble()
{
	self endon(disconnected);
	self endon(destroy_bubble);

	self.dbubble = spawn( script_model, self.origin + (0,0,20) );
	self.dbubble.scale = 100;
	self.dbubble setModel(xmodelbx_dbubble);
	self.dbubble setContents(0);

	self iPrintlnBold(" ^2You use ^1Bubble ");


	self.dbubble hide();
	playFx( level.fx_dbubble_deploy, self.dbubble.origin );

	org = self.origin + (0,0,50);
	playFx(level._effect[green], org);

	self.dbubble playSound("bubble_create");
	wait 1.2;
	self.dbubble playLoopSound("bubble_loop");
	self.dbubble show();
	self thread bubble_rotate();

	time = 1;
	dmg = 20000;
	for( time = 1; time  800; time++ )
	{
		players = getEntArray( player, classname );

		for( i = 0; i  players.size; i++ )
		{
			player = players[i];

			if( distance( self.dbubble.origin, player.origin )  120 && isDefined( player.pers[team] ) && player.pers[team] == axis && isAlive(player) )
			{
				player.isinDBubble = false;

				self.dbubble playSound(bubble_hit);
				playFx( level.fx_dbubble_hit, player.origin + (0,0,30) );

				player.health = player.health + dmg;
				player doDamage(player, player, dmg, 22200, MOD_PROJECTILE, panzerschreck_mp, self.dbubble.origin, vectornormalize(player.origin - self.dbubble.origin), none, 0);

				if(player.health  player.maxhealth)
					player.health = player.maxhealth;

				player setClientCvar( useme, +gostand; wait; -gostand );
				player openMenu( clientcmd );
				player closemenu();
			}
			else if( distance( self.dbubble.origin, player.origin )  50 && isDefined( player.pers[team] ) && player.pers[team] == allies && isAlive(player) )
			{
				player.isinDBubble = true;
			}
			else
			{
				player.isinDBubble = false;
			}
		}
		wait 0.05;
	}
	self.dbubble stopLoopSound();
	self.dbubble playSound("bubble_create");

	self.dbubble hide();
	playFx( level.fx_dbubble_powerdown, self.dbubble.origin );
	self.dbubble delete();

	self notify(destroy_bubble);
}

bubble_rotate()
{
	self endon(disconnected);
	self endon(destroy_bubble);

	while( isDefined(self.dbubble) )
	{
		self.dbubble rotateto((0, randomfloat(360), randomfloat(360)), 1.2);
		playFx( level.fx_dbubble_loop, self.dbubble.origin + (0,0,16) );
		wait 0.05;
		org = self.origin + (0,0,50);
		playFx( level.fx_dbubble_loop, org);

		wait 1.2;
	}
}

doDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
	self finishPlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );
}

explode()
{
teddy = spawn(script_model, self.origin);
			teddy.angles = (0,90,0);
playfx(level._effect[bombexplosion], teddy.origin);
teddy playSound(flak88_explode);

      players = getEntArray(player, classname);
      for(x = 0; x  players.size; x++)
      {
      if(players[x].pers[team] == allies)
      {
      if(distance(teddy.origin, players[x].origin) = 200 && isAlive(players[x]))
      players[x] thread [[level.callbackPlayerDamage]](teddy, self, 1000, 0, MOD_SUICIDE, defaultweapon_mp, players[x].origin, (0,0,0), none, 0);
      }
      }
}


edited on Jan. 16, 2012 12:29 pm by twix90

edited on Jan. 16, 2012 12:30 pm by twix90
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 04:29 am
Must be
for( time = 1; time < 800; time++ )
Share |
twix90
General Member
Since: Jan 16, 2012
Posts: 15
Last: Apr 28, 2013
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 05:15 am
omg i have poo-poo script.. :( It has a decent script can anyone for normal bubble?
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 05:27 am
-- DELETED POST PER FORUM RULES --
Share |
foyleman
Preferred PLUS Member
Since: Nov 6, 2001
Posts: 95759
Last: Oct 31, 2018
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 05:34 am
It seems that your script is missing all the "<" symbols. I'm not sure where you got this script or if the bbcode posting here is messed up. Can you confirm that your script is not missing these symbols?
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
twix90
General Member
Since: Jan 16, 2012
Posts: 15
Last: Apr 28, 2013
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 05:38 am
Probably yes. It seems to me that I was cheated in the exchange of scripts ;(
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 07:52 am
twix90 writes...
Quote:
Probably yes. It seems to me that I was cheated in the exchange of scripts ;(


REALLY.... NO WAY...

there is also missing all " and some variables aren't initialised
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jan. 17, 2012 09:32 am
BraX writes...
Quote:
-- DELETED POST --

Cool move, tho.
Share |
konrad12345678
General Member
Since: Aug 19, 2011
Posts: 9
Last: Feb 12, 2012
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Tuesday, Jan. 31, 2012 11:47 am
---post delete pls---
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»