Forums Index >> Modding >> Multi change script V1.0!!!



Page : <1> :


Well its about time for my first script XD I started today and Am doing very well! I think it will be done in 2-3 days!

What does it do?
well it is a script thet will save you time on modding it will have the ability to, when a person enters the gate,

Kill the player
Heal the player
change his projectile
change his tank (edit which tank in the pref file)
teleport him (again edit the position in the pref file)
and hopefully change his team!!!!

All and any of those can be turned on or off in the pref file
you will be able to use up to 5 gates with completly different prefs!!!!!
for instances one might kill you but another might heal you!

Note: if I dont find out how to change it into a.dso, it might be released open-sourced

Sunday, May 29, 2005 at 6:33:29 PM

Spark spark spark spark.......
the dso is created when you play the game and the source code is compiled.....

 

 

 

 

Sunday, May 29, 2005 at 7:16:03 PM

Every time I play TT (and I have the script exec'd) It dosent make a.dso

Sunday, May 29, 2005 at 7:28:16 PM

Well spark I am afraid you have stumbled apon.....

 

 

 

 

 

Sunday, May 29, 2005 at 7:40:39 PM

LOL I love that show XD

Sunday, May 29, 2005 at 8:28:04 PM

I seriously think you just cant find it, cause if the game isnt compiling, then it shouldent work......

 

 

 

 

Sunday, May 29, 2005 at 8:37:35 PM

Do you mean the script wont work or the.dso?
because the script isnt working the way it should....

Sunday, May 29, 2005 at 10:19:15 PM

Only the projectile changing works

Sunday, May 29, 2005 at 10:20:40 PM


KillMe

 

                                        

Function Killgate::OnEnter(%db,%this,%tank)
{
%client.player.hurtMe(999);
}

 

HealMe

 

                                        
function Healgate::OnEnter(%db,%this,%tank)
{
%client.player.hurtMe(-999);
}

 

ChangeMe

 

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

 

ChangeProjectile

 

                                        
function ProjectileGate::OnEnter(%db,%this,%tank)
{
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
%choice = getRandom(5);
%tank.client.setProjectile($pupTypes[%choice]);
}

 

I have no idea about the TeamChangerGateThingyMoBob. I've tried doing it before and haven't had any luck. Nor do I have any idea as to how to make the gate pick one of thoes functions randomly.

Last edited: Sunday, May 29, 2005 at 11:53:55 PM

Sunday, May 29, 2005 at 11:52:44 PM

You would have to make an if statement saying that the tank has to have a certain health to heal it or to kill it.


Monday, May 30, 2005 at 7:38:58 AM

@appleyard
Lets count how many of those scripts would work...
2

One of the ones that'd work could freeze the player after dieing, the other has like 4 lines it doesnt need


Monday, May 30, 2005 at 9:41:20 AM

I think this is whats wrong with the changeme

 

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

 

That should be it

 

 

 

 

Sunday, June 05, 2005 at 2:45:09 AM

Yea :) thats it :P


Sunday, June 05, 2005 at 7:02:44 AM

Woot! First time ive done some scripting! XD

And this one should be

 

Function ProjectileGate::OnEnter(%db,%this,%tank)
{
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
%choice = getRandom(2);
%tank.client.setProjectile($pupTypes[%choice];
}

 

P.S - How do I put these into a reload gate??

 

 

 

 

Last edited: Sunday, June 05, 2005 at 8:52:41 AM

Sunday, June 05, 2005 at 8:45:43 AM

Nahhh... It should be

 

                                        
function ProjectileGate::OnEnter(%db,%this,%tank)
{
%choice = getRandom(NUMBER OF PROJECTILES GIVEN BY POWERUPS YOU HAVE - 1);
%tank.client.setProjectile($pupTypes[%choice]);
}

 

And another one wrong is the kill one, it should be

 

                                        
function Killgate::OnEnter(%db,%this,%tank)
{
%tank.hurtMe(999);
}

 

 


Last edited: Sunday, June 05, 2005 at 10:14:40 AM

Sunday, June 05, 2005 at 10:14:09 AM

How do I make the Reload gates do these different things now?

 

 

 

 

Sunday, June 05, 2005 at 1:43:55 PM

Well make a datablock using the name before the ::OnEnter part and make it use the reload gate.dts


Sunday, June 05, 2005 at 1:46:03 PM

Hey Pedro, since you're not a jackass, heres a little more of a detailed explanation.

In order for the commands to work, you of course got to have an object that triggers the function in the first place. The object you use can be anything you want, it doesn't haft to be stricly a reload-gate. As long a few requirements are met.

The following to peices of code should go either in the.mission file or in an external script.

 

Function FunctionName ::OnEnter(%db,%this,%tank)
{
$pupTypes[0] = "SpeedyProjectile";
$pupTypes[1] = "BounceProjectile";
$pupTypes[2] = "SplashProjectile";
%choice = getRandom(2);
%tank.client.setProjectile($pupTypes[%choice];
}

 

 

Datablock powerupdata(FunctionName ) //The datablocks name has to be to identical to the functions name,
// or else it won't work. Logical enough.
{
aipickup = 0;
emitterduration = 0;
maxoff = 100;
minoff = 50;
shadow = 1;
shadowanimation = 1;
shape = "game/data/shapes/common/This could be what ever you want .dts";
starton = 0;
staticshadow = 0;
};

 

Then. You'd need to edit the default (or added) desiered objects datablock in your mission file.

 


};
new PowerUp() {
dataBlock = "FunctionsName "; //again, use the same name. Or else it will not work, at all.
position = "0.100 0.100 0.100";
rotation = "0.0 0.0 0.0 0.0";
scale = "1 1 1";
lightBoost = "0";
};

 


Last edited: Sunday, June 05, 2005 at 10:50:40 PM

Sunday, June 05, 2005 at 10:48:38 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