Forums Index >> Modding >> TankChangerGate.



Page : <1> :


This code enables you to make reload gates that give you one of the randm five tanks when entered:

Copy and Paste this function and datablock to the TOP of your.mis file before the //--- OBJECT WRITE BEGIN --- :.

 

Function gate::OnEnter(%db,%this,%tank)
{
$tanktype[1] = "lighttank";
$tanktype[2] = "mediumtank";
$tanktype[3] = "heavytank";
$tanktype[4] = "babyboss";
$tanktype[5] = "bosstank";
%choice = getRandom(5);
%tank.setdatablock($tanktype[%choice]);
%tank.client.startingtankdb = $tanktype[%choice];
}

Datablock powerupdata(gate)
{
aipickup = 0;
emitterduration = 0;
maxoff = 100;
minoff = 50;
shadow = 1;
shadowanimation = 1;
shape = "game/data/shapes/common/powerup .dts";
starton = 0;
staticshadow = 0;
};

 

-now once that is done
-there are two ways to directing the object to the function/datablock listed above:
-manually change the defualt reload gate in your.mis file-to look like this:

BEFORE:

 

New PowerUp() {
dataBlock = "reload ";
position = "-115.48 70.0202 114.747"; <---------------posistion is independant on you
rotation = "-0.0206797 -0.0450607 0.99877 164.431";
scale = "1 1 1";
lightBoost = "0";
};

 

AFTER(in order for the code to work):

 


New PowerUp() {
dataBlock = "gate ";
position = "-115.48 70.0202 114.747"; <---------------posistion is dependant on you
rotation = "-0.0206797 -0.0450607 0.99877 164.431";
scale = "1 1 1";
lightBoost = "0";
};

 

-the other way do it is by placing your gates to your pleasure using the ol' Mod Wizard.
-in that case, you would impliment the same steps listed above.

With thanks to Art Crazy.

EDIT:
Too right you are Boo!
Had no idea.

Instad of the function acting through a reloadgate I have changed the object to a powerup which will apply the same effect.
You change the object to what ever you like:
scrumgoal
boostpad
arrow
just edit this line to the acorrding object you want to use found in your gaming files:

 

Datablock powerupdata(gate)
{
aipickup = 0;
emitterduration = 0;
maxoff = 100;
minoff = 50;
shadow = 1;
shadowanimation = 1;
shape = "game/data/shapes/common/YOUR OBJECT HERE .dts";
starton = 0;
staticshadow = 0;
};

 

 

Last edited: Thursday, February 24, 2005 at 10:23:15 PM

Thursday, February 24, 2005 at 9:45:30 PM

LOL RANDOM TANK CHANGER! What for? XD

Good work! %)

Thursday, February 24, 2005 at 9:53:18 PM

You need to do this, remove Bosstank or change gate to scrumgoal. Becouse if you got BossTank from random tank changer, it's too big(-boned XD ) to enter gate.

Please do it...

Thursday, February 24, 2005 at 9:55:36 PM

Lol interesting idea hossil! ;)

You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.

Friday, February 25, 2005 at 4:13:55 AM

I never thought you would release that.. Oh well I sent u the centerprint fix a while ago, be sure to update your post


Friday, February 25, 2005 at 7:26:29 AM

Release it?
Wll ya its nothing prolific. Why horde it? And it actually explains quite a bit about modding and what not.
One mans trash is another mans trasure.

I hate typos with passion

Last edited: Friday, February 25, 2005 at 8:22:17 AM

Friday, February 25, 2005 at 8:20:54 AM

Sehr gute Idee, habe ich sie einmal vor aber mein immer zerschmettertes Spiel versucht

Last edited: Friday, February 25, 2005 at 11:56:08 PM

Friday, February 25, 2005 at 8:06:01 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald