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

Members Online

»
0 Active | 83 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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
Page
Previous Page
subscribe
Author Topic: Pick numbers
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Sunday, Dec. 5, 2010 11:44 pm
Code:
ShowMessage(message)
{	
	if(!isDefined(self.messagenum))
		self.messagenum = -1;
		
	self.messagenum++;
        [...]


This should also work instead of the look I think.

But now there is an other problem... :(

Code:
******* script runtime error *******
removed entity is not an entity: (file 'maps/mp/gametypes/_zom.gsc', line 879)
 self.message[self.messagenum] destroy();
             *


It deletes the second message (with self.messagenum = 1), but the first one (self.messagenum = 0) stays and then is given this error.

edited on Dec. 5, 2010 06:46 pm by Leal
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Dec. 6, 2010 04:26 am
I don't know what you're doing? You're giving too little code and/or too little description
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Dec. 6, 2010 10:14 am
Code:
ShowMessage(message)
{	
	if(!isDefined(self.messagenum))
		self.messagenum = 0;
		
	self.messagenum++;
	
	self.message[self.messagenum] = newClientHudElem(self);	
	self.message[self.messagenum].x = 0;
	self.message[self.messagenum].y = -100+(self.messagenum*12);
	self.message[self.messagenum].alignX = "center";
	self.message[self.messagenum].alignY = "middle";
	self.message[self.messagenum].horzAlign = "center_safearea";
	self.message[self.messagenum].vertAlign = "center_safearea";
	self.message[self.messagenum].sort = 9999; //-3
	self.message[self.messagenum].alpha = 0;
	self.message[self.messagenum].archived = false;
	self.message[self.messagenum].font = "bigfixed";
	self.message[self.messagenum].fontScale = 0.625;
	self.message[self.messagenum].label = (message);	
	
	self.message[self.messagenum] fadeOverTime(0.1);
	self.message[self.messagenum] moveOverTime(0.2);
	self.message[self.messagenum].alpha = 0.2;
	
	self.message[self.messagenum] moveOverTime(0.2);
	self.message[self.messagenum] fadeOverTime(0.2);
	self.message[self.messagenum].alpha = 1;
	
	//self iprintlnbold(self.messagenum);

	wait 6;

	self.message[self.messagenum] fadeOverTime(2);
	self.message[self.messagenum].alpha = 0;
	
	wait 3;

	self.message[self.messagenum] destroy();
}
Share |
Restricted Access Topic is Locked
Page
Previous Page
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

»