Forums Index >> Modding >> Multi change script V1.0!!!
Page : <1> :
Spark spark spark spark.......
the dso is created when you play the game and the source code is compiled.....
Every time I play TT (and I have the script exec'd) It dosent make a.dso
Well spark I am afraid you have stumbled apon.....
LOL I love that show XD
I seriously think you just cant find it, cause if the game isnt compiling, then it shouldent work......
Do you mean the script wont work or the.dso?
because the script isnt working the way it should....
Only the projectile changing works
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
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.
@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
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
Yea :) thats it :P
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
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
Well make a datablock using the name before the ::OnEnter part and make it use the reload gate.dts
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
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