Forums Index >> Modding >> How to get this script work?



Page : <1> :


 

 


datablock flagdata(NewFlag)
{
bounceStatic = "0.5";
bounceTerrain = "0.7";
category = "Flags";
className = "FlagData";
collISI = "200";
frictionTerrain = "0.4";
hardCollSound = "softCollSound";
hardCollVel = "1";
noPickup = "0";
shapeFile = "game/data/shapes/common/scrumball.dts";
snagFlagSound = "PupOffSound";
softCollVel = "1";
springCorrectScale1 = "2";
springCorrectScale2 = "0.99";
springRange = "0.3";
springVelScale = "1";
unstuckBoost = "10";
unstuckTime = "2500";
};

Function NewFlag::onoutofbounds(%db, %flag)
{
%rot = %flag.rotation;
%newPos = ("52.546 45.7144 70.6158" @ " " @ %rot);
%flag.settransform(%newpos);
}

Datablock powerupdata(GreenBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

Function GreenBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

If(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Green Team!", 2, 1);}

Datablock powerupdata(BlueBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

Function BlueBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

If(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Blue Team!", 2, 1);
}

 

I got this some time ago from someones thread, but when I try it my download bar freezes.

Wednesday, July 20, 2005 at 11:46:38 PM

You're missing a } in the end, and make sure function, if etc ain't capitalized


Thursday, July 21, 2005 at 4:24:13 AM

CTF Gametype script?

Thursday, July 21, 2005 at 5:57:09 AM

Something like that...ty art :)

Thursday, July 21, 2005 at 8:20:33 AM

But there is a } in end, and Functions are functions. Whats wrong it still freezes?

Thursday, July 21, 2005 at 8:53:12 AM

Datablock -> datablock, Function -> function, If -> if. All of them should start with lowercase not only function.

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.

Thursday, July 21, 2005 at 9:55:08 AM

Do it for the Green function.

Thursday, July 21, 2005 at 11:07:43 AM

Thats just PTT changing them to a capital "F"

 

 

 

 

Thursday, July 21, 2005 at 12:08:02 PM

I try this triv. The "If's" were both Ifs. :)

Thursday, July 21, 2005 at 11:30:37 PM

Now I post it again, the bolded ones are in lower case in my mission file.

 

f unction NewFlag::onoutofbounds(%db, %flag)
{
%rot = %flag.rotation;
%newPos = ("52.546 45.7144 70.6158" @ " " @ %rot);
%flag.settransform(%newpos);
}

d atablock powerupdata(GreenBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction GreenBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Green Team!", 2, 1);}

d atablock powerupdata(BlueBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction BlueBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Blue Team!", 2, 1);
}

 

 

Last edited: Thursday, July 21, 2005 at 11:34:45 PM

Thursday, July 21, 2005 at 11:33:47 PM

Whats wrong...bad thing that I dont remember the thread I got this from long time ago, maybe theres solution.
PTT search found nothing when I entered part of this script. :o

Thursday, July 21, 2005 at 11:36:14 PM

Putti, this works. Heh, good find putti. When you change the datablock and function first letter to be bolted it will stay lowercase. :) You need to change the two If -> if.

 

f unction NewFlag::onoutofbounds(%db, %flag)
{
%rot = %flag.rotation;
%newPos = ("52.546 45.7144 70.6158" @ " " @ %rot);
%flag.settransform(%newpos);
}

d atablock powerupdata(GreenBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction GreenBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Green Team!", 2, 1);}
}

d atablock powerupdata(BlueBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction BlueBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Blue Team!", 2, 1);
}
}

 

 

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.

Last edited: Friday, July 22, 2005 at 3:53:02 AM

Friday, July 22, 2005 at 3:47:54 AM

 

 


function GreenBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

If(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Green Team!", 2, 1);}
}

 


STILL missing a }!

Friday, July 22, 2005 at 4:27:40 AM

^Nope.

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, July 22, 2005 at 4:29:11 AM

Oh... Well, make it more visible!

Friday, July 22, 2005 at 4:47:56 AM

Whaaaa?

Anyways, it works now. And I want to say this to everyone: dont use this, seems it does nothing :O

Stupid script.

Ps. Let this thread die now %)

Friday, July 22, 2005 at 5:02:32 AM

Hey, I was going to agree with you putti, but I noticed something when I scrolled down. There is also a datablock for the newflag, which wasn't in the your latest post which I fixed up. In your first post there is this. Make sure you have that too!

 

d atablock flagdata(NewFlag)
{
bounceStatic = "0.5";
bounceTerrain = "0.7";
category = "Flags";
className = "FlagData";
collISI = "200";
frictionTerrain = "0.4";
hardCollSound = "softCollSound";
hardCollVel = "1";
noPickup = "0";
shapeFile = "game/data/shapes/common/scrumball.dts";
snagFlagSound = "PupOffSound";
softCollVel = "1";
springCorrectScale1 = "2";
springCorrectScale2 = "0.99";
springRange = "0.3";
springVelScale = "1";
unstuckBoost = "10";
unstuckTime = "2500";
};

 

 

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, July 22, 2005 at 5:49:10 AM

O yes, there was no datablock for the object

 

 

 

 

Friday, July 22, 2005 at 6:09:04 AM

Well, it does nothing because you didnt put the flag nor the base in the mission :P


Friday, July 22, 2005 at 6:10:55 AM

Oh...trying again.

Friday, July 22, 2005 at 9:38:44 AM

Did not work. Last time I post again...

 

f unction NewFlag::onoutofbounds(%db, %flag)
{
%rot = %flag.rotation;
%newPos = ("52.546 45.7144 70.6158" @ " " @ %rot);
%flag.settransform(%newpos);
}

d atablock powerupdata(GreenBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction GreenBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Green Team!", 2, 1);}
}

d atablock powerupdata(BlueBase)
{
aiPickup = "0";
className = "PowerUpData";
emitterDuration = "0";
maxOff = "0";
minOff = "0";
shadow = "0";
shadowAnimation = "0";
sound = "PupOnSound";
startOn = "1";
staticShadow = "0";
shape = "game/data/shapes/common/scrumgoal.dts";
};

f unction BlueBase::onenter(%db,%this,%tank)
{
%client = %tank.client;
%team = %client.team;
%name = %client.namebase;
%flag = %tank.getflag();
%flagtype = %flag.getname();

I f(%flagtype $= "NewFlag")
{
%tank.incscore(1, 1, 1);
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10")); bottomprintall(%name@ " Has Scored A Goal For The Blue Team!", 2, 1);
}
}

d atablock flagdata(NewFlag)
{
bounceStatic = "0.5";
bounceTerrain = "0.7";
category = "Flags";
className = "FlagData";
collISI = "200";
frictionTerrain = "0.4";
hardCollSound = "softCollSound";
hardCollVel = "1";
noPickup = "0";
shapeFile = "game/data/shapes/tanks/brain.dts";
snagFlagSound = "PupOffSound";
softCollVel = "1";
springCorrectScale1 = "2";
springCorrectScale2 = "0.99";
springRange = "0.3";
springVelScale = "1";
unstuckBoost = "10";
unstuckTime = "2500";
};

 

And this in in mission file:

 


n ew Flag() {
dataBlock = "newflag";
position = "23.8043 -19.9211 66.4136";
rotation = "0.0946489 -0.192491 0.976724 59.8902";
scale = "1 1 1";
lightBoost = "0";
};

 

I can get the flag (which I turned to brain to see if its different from original flag), but when I try to go the goals nothing happens.

Friday, July 22, 2005 at 9:54:49 AM

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