DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

Scripting: Timer

Modding questions, answers, help.....

Moderators: Warfare, Admin, Moderator

Post Reply
User avatar
Eragon
New Brainjar
New Brainjar
Posts: 8
Joined: Wed Jan 27, 2010 12:15 am
Location: The Mushroom Kingdom

Scripting: Timer

Post by Eragon »

If someone out there knows how to script a timer (like the ones you might see in a race mod) please reply!!! Thanks.
Image "Wussup Guyz?!"
Image "Yo!"
Image "How's it hangin?"
Image "Rock on!!!"
Image "Sup dudes!"
Fixit
New Brainjar
New Brainjar
Posts: 46
Joined: Thu Dec 28, 2006 12:43 am
Location: California, USA
Contact:

Re: Scripting: Timer

Post by Fixit »

place the following at top of .mis file above //--- OBJECT WRITE BEGIN ---


function Clock::OnEnter(%this,%db,%tank)
{
schedule(1000,false,"bottomprintall","1", 4,2);
schedule(2000,false,"bottomprintall","2", 4,2);
schedule(3000,false,"bottomprintall","3", 4,2);
schedule(4000,false,"bottomprintall","4", 4,2);
schedule(5000,false,"bottomprintall","5", 4,2);
schedule(6000,false,"bottomprintall","6", 4,2);
schedule(7000,false,"bottomprintall","7", 4,2);
schedule(8000,false,"bottomprintall","8", 4,2);
schedule(9000,false,"bottomprintall","9", 4,2);
schedule(10000,false,"bottomprintall","10", 4,2);
schedule(11000,false,"bottomprintall","11", 4,2);
schedule(12000,false,"bottomprintall","12", 4,2);
schedule(13000,false,"bottomprintall","13", 4,2);
schedule(14000,false,"bottomprintall","14", 4,2);
schedule(15000,false,"bottomprintall","15", 4,2);
schedule(16000,false,"bottomprintall","16", 4,2);
schedule(17000,false,"bottomprintall","17", 4,2);
schedule(18000,false,"bottomprintall","18", 4,2);
schedule(19000,false,"bottomprintall","19", 4,2);
schedule(20000,false,"bottomprintall","20", 4,2);
schedule(21000,false,"bottomprintall","21", 4,2);
schedule(22000,false,"bottomprintall","22", 4,2);
schedule(23000,false,"bottomprintall","23", 4,2);
schedule(24000,false,"bottomprintall","24", 4,2);
schedule(25000,false,"bottomprintall","25", 4,2);
schedule(26000,false,"bottomprintall","26", 4,2);
schedule(27000,false,"bottomprintall","27", 4,2);
schedule(28000,false,"bottomprintall","28", 4,2);
schedule(29000,false,"bottomprintall","29", 4,2);
schedule(30000,false,"bottomprintall","30", 4,2);
schedule(31000,false,"bottomprintall","31", 4,2);
schedule(32000,false,"bottomprintall","32", 4,2);
schedule(33000,false,"bottomprintall","33", 4,2);
schedule(34000,false,"bottomprintall","34", 4,2);
schedule(35000,false,"bottomprintall","35", 4,2);
schedule(36000,false,"bottomprintall","36", 4,2);
schedule(37000,false,"bottomprintall","37", 4,2);
schedule(38000,false,"bottomprintall","38", 4,2);
schedule(39000,false,"bottomprintall","39", 4,2);
schedule(40000,false,"bottomprintall","40", 4,2);
schedule(41000,false,"bottomprintall","41", 4,2);
schedule(42000,false,"bottomprintall","42", 4,2);
schedule(43000,false,"bottomprintall","43", 4,2);
schedule(44000,false,"bottomprintall","44", 4,2);
schedule(45000,false,"bottomprintall","45", 4,2);
schedule(46000,false,"bottomprintall","46", 4,2);
schedule(47000,false,"bottomprintall","47", 4,2);
schedule(48000,false,"bottomprintall","48", 4,2);
schedule(49000,false,"bottomprintall","49", 4,2);
schedule(50000,false,"bottomprintall","50", 4,2);
schedule(51000,false,"bottomprintall","51", 4,2);
schedule(52000,false,"bottomprintall","52", 4,2);
schedule(53000,false,"bottomprintall","53", 4,2);
schedule(54000,false,"bottomprintall","54", 4,2);
schedule(55000,false,"bottomprintall","55", 4,2);
schedule(56000,false,"bottomprintall","56", 4,2);
schedule(57000,false,"bottomprintall","57", 4,2);
schedule(58000,false,"bottomprintall","58", 4,2);
schedule(59000,false,"bottomprintall","59", 4,2);
schedule(60000,false,"bottomprintall","1.00", 4,2);
schedule(61000,false,"bottomprintall","1.01", 4,2);
schedule(62000,false,"bottomprintall","1.02", 4,2);
schedule(63000,false,"bottomprintall","1.03", 4,2);
schedule(64000,false,"bottomprintall","1.04", 4,2);
schedule(65000,false,"bottomprintall","1.05", 4,2);
schedule(66000,false,"bottomprintall","1.06", 4,2);
schedule(67000,false,"bottomprintall","1.07", 4,2);
schedule(68000,false,"bottomprintall","1.08", 4,2);
schedule(69000,false,"bottomprintall","1.09", 4,2);
schedule(70000,false,"bottomprintall","1.10", 4,2);
schedule(71000,false,"bottomprintall","1.11", 4,2);
schedule(72000,false,"bottomprintall","1.12", 4,2);
schedule(73000,false,"bottomprintall","1.13", 4,2);
schedule(74000,false,"bottomprintall","1.14", 4,2);
schedule(75000,false,"bottomprintall","1.15", 4,2);
schedule(76000,false,"bottomprintall","1.16", 4,2);
schedule(77000,false,"bottomprintall","1.17", 4,2);
schedule(78000,false,"bottomprintall","1.18", 4,2);
schedule(79000,false,"bottomprintall","1.19", 4,2);
schedule(80000,false,"bottomprintall","1.20", 4,2);
schedule(81000,false,"bottomprintall","1.21", 4,2);
schedule(82000,false,"bottomprintall","1.22", 4,2);
schedule(83000,false,"bottomprintall","1.23", 4,2);
schedule(84000,false,"bottomprintall","1.24", 4,2);
schedule(85000,false,"bottomprintall","1.25", 4,2);
schedule(86000,false,"bottomprintall","1.26", 4,2);
schedule(87000,false,"bottomprintall","1.27", 4,2);
schedule(88000,false,"bottomprintall","1.28", 4,2);
schedule(89000,false,"bottomprintall","1.29", 4,2);
schedule(90000,false,"bottomprintall","1.30", 4,2);
schedule(91000,false,"bottomprintall","1.31", 4,2);
schedule(92000,false,"bottomprintall","1.32", 4,2);
schedule(93000,false,"bottomprintall","1.33", 4,2);
schedule(94000,false,"bottomprintall","1.34", 4,2);
schedule(95000,false,"bottomprintall","1.35", 4,2);
schedule(96000,false,"bottomprintall","1.36", 4,2);
schedule(97000,false,"bottomprintall","1.37", 4,2);
schedule(98000,false,"bottomprintall","1.38", 4,2);
schedule(99000,false,"bottomprintall","1.39", 4,2);
schedule(100000,false,"bottomprintall","1.40", 4,2);
schedule(101000,false,"bottomprintall","1.41", 4,2);
schedule(102000,false,"bottomprintall","1.42", 4,2);
schedule(103000,false,"bottomprintall","1.43", 4,2);
schedule(104000,false,"bottomprintall","1.44", 4,2);
schedule(105000,false,"bottomprintall","1.45", 4,2);
schedule(106000,false,"bottomprintall","1.46", 4,2);
schedule(107000,false,"bottomprintall","1.47", 4,2);
schedule(108000,false,"bottomprintall","1.48", 4,2);
schedule(109000,false,"bottomprintall","1.49", 4,2);
schedule(110000,false,"bottomprintall","1.50", 4,2);
schedule(111000,false,"bottomprintall","1.51", 4,2);
schedule(112000,false,"bottomprintall","1.52", 4,2);
schedule(113000,false,"bottomprintall","1.53", 4,2);
schedule(114000,false,"bottomprintall","1.54", 4,2);
schedule(115000,false,"bottomprintall","1.55", 4,2);
schedule(116000,false,"bottomprintall","1.56", 4,2);
schedule(117000,false,"bottomprintall","1.57", 4,2);
schedule(118000,false,"bottomprintall","1.58", 4,2);
schedule(119000,false,"bottomprintall","1.59", 4,2);
schedule(120000,false,"bottomprintall","2.00", 4,2);
schedule(121000,false,"bottomprintall","2.01", 4,2);
schedule(122000,false,"bottomprintall","2.02", 4,2);
schedule(123000,false,"bottomprintall","2.03", 4,2);
schedule(124000,false,"bottomprintall","2.04", 4,2);
schedule(125000,false,"bottomprintall","2.05", 4,2);
schedule(126000,false,"bottomprintall","2.06", 4,2);
schedule(127000,false,"bottomprintall","2.07", 4,2);
schedule(128000,false,"bottomprintall","2.08", 4,2);
schedule(129000,false,"bottomprintall","2.09", 4,2);
schedule(130000,false,"bottomprintall","2.10", 4,2);
schedule(131000,false,"bottomprintall","2.11", 4,2);
schedule(132000,false,"bottomprintall","2.12", 4,2);
schedule(133000,false,"bottomprintall","2.13", 4,2);
schedule(134000,false,"bottomprintall","2.14", 4,2);
schedule(135000,false,"bottomprintall","2.15", 4,2);
schedule(136000,false,"bottomprintall","2.16", 4,2);
schedule(137000,false,"bottomprintall","2.17", 4,2);
schedule(138000,false,"bottomprintall","2.18", 4,2);
schedule(139000,false,"bottomprintall","2.19", 4,2);
schedule(140000,false,"bottomprintall","2.20", 4,2);
schedule(141000,false,"bottomprintall","2.21", 4,2);
schedule(142000,false,"bottomprintall","2.22", 4,2);
schedule(143000,false,"bottomprintall","2.23", 4,2);
schedule(144000,false,"bottomprintall","2.24", 4,2);
schedule(145000,false,"bottomprintall","2.25", 4,2);
schedule(146000,false,"bottomprintall","2.26", 4,2);
schedule(147000,false,"bottomprintall","2.27", 4,2);
schedule(148000,false,"bottomprintall","2.28", 4,2);
schedule(149000,false,"bottomprintall","2.29", 4,2);
schedule(150000,false,"bottomprintall","2.30", 4,2);
}
datablock powerupdata(Clock)
{
aipickup = 0;
emitterduration = 0;
maxoff = 150000;
minoff = 150000;
shadow = 1;
shadowanimation = 1;
shape = "game/data/shapes/Common/invisowall-nocollision.dts";
starton = true;
staticshadow = 0;
};


in this clock I used "game/data/shapes/Common/invisowall-nocollision.dts"; for the shape to start the clock

new PowerUp() {
dataBlock = "Clock";
position = "-519.356 -44.6022 77.9271";
rotation = "0 0 1 45";
scale = "1 1 1";
lightBoost = "0";
};
Post Reply