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

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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: Timer Problem
Ploxxy
General Member
Since: May 1, 2009
Posts: 170
Last: Aug 31, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Aug. 9, 2011 02:27 am
Code:

drawTimer()
{ self endon("kill_timer");
     level.tacttime = 3;
if( isDefined( self.tacticalcountdown ) )
     self.tacticalcountdown destroy();

self.tacticalcountdown = newClientHudElem(self); self.tacticalcountdown.x = 350;
self.tacticalcountdown.y = 450; //475 self.tacticalcountdown.alignX = "left"; self.tacticalcountdown.alignY = "middle"; //self.tacticalcountdown.horzAlign = "center_safearea"; //self.tacticalcountdown.vertAlign = "center_safearea"; self.tacticalcountdown.sort = 1; //-3 self.tacticalcountdown.alpha = 1; self.tacticalcountdown.fontScale = 1.5; //0.9 self.tacticalcountdown.archived = true;
self.tacticalcountdown setTimer(level.tacttime); for(;;) { if(self.sessionstate != "playing")
     self.tacticalcountdown = 0;
else
     self.tacticalcountdown = 1;

     self.tacticalcountdown setTimer(level.tacttime);
level.tacttime--;
if(level.tacttime <= 0)
     self notify("kill_timer");

} }


The code is having problems. It says int self.tacticalcountdown is not an entity. and the timer wont delete after its done and at 0. Anyone got any ideas?

edited on Aug. 8, 2011 10:27 pm by Ploxxy
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Aug. 9, 2011 08:41 am
self.tacticalcountdown = 0;
else
self.tacticalcountdown = 1;

There's your problem.
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

»