Forums Index >> Modding >> Why?



Page : <1> :


Um,so,your point?

%tank.hurtMe(100);

^ That means you will get 100 points of damage when you activate the function thingy.

Saturday, February 19, 2005 at 12:06:41 PM

First off, I think you need to create a new datablock for your "death power-up".

Also the lack of "else if" in your code negates the other "if" statements
An example of a command the has permitters.
"if"
"else if"
"else if"
"else if"
"else"
the program seeks truth in a way. But you have to give it a true statement to match up with. So if it is not true with the first "if", it goes to the next or the next until it finds one that is true. So by leaving out the "else if" your not asking it to seek for truth your just telling it what truth is.
Therefor you just told the game that "all" power-ups hurt 100 units. (%tank.hurtMe(100);)

Try this:
_____________________________________________________
Create a datablock after heal.

 


Datablock PowerUpData(Death)
{
category = "PowerUp";
shape = "~/data/shapes/common/powerup.dts";
type = "health";
minOff = 90000;
maxOff = 120000;
startOn = false;
shadow = true;
shadowAnimation = true;
aiPickup = true;

Sound = "PupOnSound";
soundOff = "PupOffSound";
};

 


______________________________________________________
then In this section, after the health perhaps.
function PowerUpData::onEnter(%db,%this,%tank)

 


Else if (%db.type $= "death")
{
%tank.hurtMe(100);
%this.schedule(5000,"setDatablock","TestPowerup");
}

 

I did not test this, sorry if it doesn't work, but it may be a step closer.
and remember to un-capitalize the first letter of each line.
MAX

Last edited: Sunday, February 20, 2005 at 7:38:57 AM

Saturday, February 19, 2005 at 12:21:53 PM

Yah it worked.
question: what does the function/code look like in the special.cs for jumpads/boosites?

Saturday, February 19, 2005 at 10:29:49 PM


 


Datablock BoostData(TestBoost)
{
category = "Boost";
shape = "~/data/shapes/common/boostpad.dts";
type = "additive";
shadow = false;
advanceDelayOnEnter = 200;
numStates = 4;

StateName1 = "moe";
velocity1 = 24.5; <-----------------------------------------------------------
minDuration1 = 0;

StateName2 = "larry";
velocity2 = 24.5; <-----------------------------------------------------------
minDuration2 = 0;

StateName3 = "curly";
velocity3 = 24.5; <-----------------------------------------------------------
minDuration3 = 0;

StateName4 = "schemp";
velocity4 = 24.5; <-----------------------------------------------------------
minDuration4 = 0;

Sound = "ZoomSound";
};

Datablock BoostData(Boost4 : TestBoost)
{
numStates = 4;
};

Datablock BoostData(Boost1 : TestBoost)
{
numStates = 1;

};

Datablock BoostData(TestJump)
{
category = "Boost";
shape = "~/data/shapes/common/jumppad.dts";
type = "additive";
shadow = false;

NumStates = 1;
stateName1 = "";
velocity1 = 16.5; <-----------------------------------------------------------

Sound = "BlowSound";
};

 

 

Last edited: Monday, February 21, 2005 at 11:46:37 AM

Sunday, February 20, 2005 at 7:38:29 AM

@MAX

Yah, I kinda figured that. What I meant by my question was:
What if the keyword in that data block that increases your speed when you hit a boost, and what is the keyword that launches you in the air when you hit a jumppad?

Sunday, February 20, 2005 at 4:39:50 PM

Testboost.velocity1 = *;
testjump.velocity1 = *;
ect.

Last edited: Sunday, February 20, 2005 at 4:45:13 PM

Sunday, February 20, 2005 at 4:44:51 PM

Nope, it uses a secret code, (not realeased yet).
It reads those variables in the datablock and gives you the boost stated in them..


Monday, February 21, 2005 at 11:28:58 AM

 

 

MoveMap.bind(keyboard,"ctrl c",Suicide);
function Suicide(%val)
{
If(%val)
{
LocalClientConnection.player.hurtme(9999999)
}
}

 

That will only work on your server if its not dedicated... But it will work

 


Monday, February 21, 2005 at 12:11:49 PM

Not workin.
What did we miss?

I even tried it like this:

LocalClientConnection.%tank .hurtme(999999999);

And for some reason my new.cs file didnt create a.dso in the process?

Last edited: Monday, February 21, 2005 at 12:30:42 PM

Monday, February 21, 2005 at 12:29:11 PM

You cant do that
it must be LocalClientConnection.player.hurtMe(9999999999);

And no idea.. I know how to get it to work but it would be much complicated than that
REMEMBER: THAT WILL ONLY WORK ON NON-DEDICATED SERVERS IF YOU'RE THE HOSTER!

PS: The first word of each line of code should be lower-case!!


Last edited: Monday, February 21, 2005 at 1:06:29 PM

Monday, February 21, 2005 at 1:05:45 PM

@Art

Yah, it works. I had to add the code to the top of my.mis file as aposed through adding the code to my scripts folder.
Just wondering:
How would you swtich through the various types of tanks using only one ".bind". As aposed to using four seperate codes for the 4 other tanks?

Monday, February 21, 2005 at 3:14:49 PM

Well, you can use Master TMO's tank toggler (get it at the old modding resource, dont know if its in the new one too)
bu to get a little key to do it is impossible, we need a script


Tuesday, February 22, 2005 at 6:41:40 AM

O darn.

Anyways, I been trying to make a heal gate:

I added these two datablocks to my speical.cs:

 


datablock PowerUpData(HealGate)
{
category = "PowerUp";
shape = "~/data/shapes/common/recharge.dts";
userseq1 = "activate";
type = "ammo";
shadow = true;
staticShadow = true;

SoundOff = "ReloadSound";

 

};

And I made a custom function for it, but that doesnt seem to be the problem.
Then, after adding one of these to the acording.mis file:

 


new PowerUp(HealGate) {
position = "-11.0834 -83.5893 99.9647";
rotation = "0.0320983 0.075679 -0.996615 47.2262";
scale = "1 1 1";
dataBlock = "Healgate";
lightBoost = "0";

 

Then, when I host my mission.
I get this in the.dos window:
"HealGate is not a member of the GameBaseData"
some shit like that.

Whys that?
The datablock is in the spiecal.cs!

In other words:
How would I add a new datablock to my GameBaseData?

[

Last edited: Wednesday, February 23, 2005 at 2:33:12 AM

Wednesday, February 23, 2005 at 1:09:48 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