Forums Index >> Modding >> defaultGoal.getPosition(); - defaultGoal.getRotati...



Page : <1> :


I've done this (AntiCamper)

 

                                        
new PowerUp() {
dataBlock = "AntiCamper";
position = DefaultGoal.getPosition();
rotation = DefaultGoal.getRotation();
scale = "1 1 1";
lightBoost = "0";
};

 

Then Dedicated Console says this:

 

                                        
Object 'AntiCamper' is not a member of the 'GameBaseData' data block class
game/server/scripts/special.cs (0): Unknown command getPosition.
Object DefaultGoal(80) DefaultGoal -> PowerUpData -> GameBaseData -> SimDataBl
ock -> SimObject
game/server/scripts/special.cs (0): Unknown command getRotation.
Object DefaultGoal(80) DefaultGoal -> PowerUpData -> GameBaseData -> SimDataBl
ock -> SimObject
game/server/scripts/special.cs (0): Register object failed for object (null).

 

 

 

 

 

 

Saturday, September 09, 2006 at 12:01:58 AM

Helloww? Anyone Please?

 

 

 

 

Sunday, September 10, 2006 at 7:10:04 AM

First create a powerup object named AntiCamper in the script. Like all the others are.

Define what happens when you enter the powerup like everything else is.

Then create and delete the powerup depending on where the goal is.
You cant use the defaultgoal.getposition() or anything like that to do this.

 

 

 

 

Sunday, September 10, 2006 at 7:13:29 AM

This is what I got at the moment

 

d atablock powerupdata(AntiCamp)
{
category = "PowerUp";
shape = "game/data/shapes/AntiCamper/AntiCamper.dts";
type = "bounce";
shadow = false;
shadowAnimation = false;
startOn = true;
minOff = 1;
maxOff = 2;
Sound = "";
soundOff = "";
};

EDIT: Yehaa!! BreakTrough! I Got The Anti-CamperObject To Appear At The Right Place!! XD (Nothing More Yet Though)

f unction CamperDamage(%tank,%loopsElapsed)
{
%loopsElapsed++;
%tank.player.hurtme(2.5);
%a1 = "SERVER RESPONSE ";
%a2 = "You're In AntiCamperArea!";
chatMessageClient(%sender, %sender, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
if ( %loopsElapsed >= 10 || $inGoal[%tank] == false)
return;
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
f unction AntiCamp::OnEnter(%db,%this,%tank)
{
if (%tank.getFlag() != -1)
return;
$inGoal[%this,%tank] = true;
schedule(5000,0,"CamperDamage",%tank);
}
f unction AntiCamp::OnLeave(%db,%this,%tank)
{
$inGoal[%this,%tank] = false;
}

n ew PowerUp() {
dataBlock = "AntiCamp";
position = DefaultGoal.Position;
rotation = DefaultGoal.Rotation;
scale = "1 1 1";
lightBoost = "0";
};

 

Function Camperdamage & AntiCamp::OnLeave/onEnter Where Made By CS

 

 

 

 

Last edited: Sunday, September 10, 2006 at 8:54:32 AM

Sunday, September 10, 2006 at 8:19:53 AM

Close cassie, but thats not what he means. I had to do a lot of this, and I mean a lot, for rollerball.

 

                                        
package onCreateNewGoal {
function pickGoal()
{
if (!isObject(Goal))
{
new PowerUp(Goal)
{
dataBlock = DefaultGoal;
};
}
%posi = PickSpawnPoint("");
Goal.setTransform(%posi);
for (%i = 0; % < MissionCleanUp.getCount(); %i++)
{
%item = MissionCleanUp.getObject(%i);
if (%item.dataBlock $= "AntiCamp") {
%item.delete();
}
}
new PowerUp(AntiCamp) {
dataBlock = AntiCamp;
position = %posi;
};
return Goal;
}
};
ActivatePackage(OnCreateNewGoal);

 

I have an alternative, that if you need, I will provide

Monday, September 11, 2006 at 12:16:20 PM

Hmm, doesn't seem to work.
Scoring is impossible, might it be because to PowerUps (AntiCamper & DefaultGoal) are on the same place?

 

Game/server/scripts/AC.cs (18): Unknown command hurtMe.
Object (1212) GameConnection -> GameConnection -> NetConnection -> SimGroup ->
SimSet -> SimObject

 

 

 

 

 

 

Last edited: Monday, September 11, 2006 at 10:17:08 PM

Monday, September 11, 2006 at 10:16:12 PM

What the anti camper for Cassie :o

 

Tuesday, September 12, 2006 at 8:28:51 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