Forums Index >> Modding >> One step closer to camperless games... Need help f...
Page : <1> :
Dont think thats possible... Prolly you'll need to add a function to degrade the tank...
You just need an emitter and an invisible box with an assigned datablock that does damage every second as long as you are in the box.
Simple.
Noooo. That would suck. In -z-s if you were in there five seconds it started doing damage. Because if it started right away the person running will most likely be smoking they would die and then the other people would get it and score.
Jacob... Thats not a problem...
My previous comment is just an example... I never saw this green cloud of -z-'s so...
That's what I meant.. The emitters dont have a subvariable that defines damage, you must have some other way o0f applying the damage to the tank
I wonder if we could apply a datablock to the emitter's bounding box... :P
If the game had triggers... TGE does but TT, as always, doesn't.... Anyways just create a dts object and make it invisible or something... Then put it near the goal and get it killing :)
You could do something like this:
function *datablock*::OnEnter(%db,%this,%tank)
{
if (%tank.getFlag != -1)
{
return;
}
CamperDamage(%tank)
}
Function CamperDamage(%tank,%loopsElapsed)
{
%loopsElapsed++;
%tank.player.hurtme(2.5);
if ( %loopsElapsed >= 10 ) // to make sure it doesnt keep looping after somone dies.. A assume 2.5 X 10 (25 damage) is enough for the average light
{
return;
}
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
I dunno, that took me 2 minutes to write. It is just an idea. If you want something more, email me. This should be enough for you to figure out some ways to script this DJ.
Hope this helped
CS
PS. I know I didnt execute what %loopsElapsed should equal in the onenter function, its okay. That would mean it was just 0...
Last edited: Friday, March 31, 2006 at 3:55:23 PM
Simple:
function CamperDamage(%tank,%loopsElapsed)
{
if ( %tank.getFlag() != -1 )
{
return;
}
%loopsElapsed++;
%tank.player.hurtme(2.5);
if ( %loopsElapsed >= 10 ) // to make sure it doesnt keep looping after somone dies.. A assume 2.5 X 10 (25 damage) is enough for the average light
{
return;
}
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
Or....
function *datablock*::OnEnter(%db,%this,%tank)
{
if (%tank.getFlag != -1)
{
return;
}
schedule(5000,0,"CamperDamage",%tank);
}
Gives someone 5 seconds before taking damage.
^ sounds like the same thing as what Canned suggested.
No
Try this...
function CamperDamage(%tank,%loopsElapsed)
{
if ( %tank.getFlag() != -1 )
{
return;
}
%loopsElapsed++;
%tank.player.hurtme(2.5);
if ( %loopsElapsed >= 10 || %tank.killMe)
{
return;
}
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
That would really screw it up though.
Also, this isnt an effect for client, so it wouldnt follow the tank. But this is still good. Oh, and that is a local variable, so you need to make it this:
$KillMe[%tank] = true;
K?
Hope this helps,
CS
Okay....now, why would -z- need to come here?
Because he had the original working version of what you are trying to create
Ok I am by no means a good scripter. But I read throgh this out of intrest. I don't know how far scripting goes but as a suggdestion I think you could have it so that whoevers holding the scrum won't get hurt by whatevers trying to hurt them, just a thought.
Ok..i read this and I thought I would mess around with it....i've made a basic one...but the only thing is that u cant camp in the scrum goal but u can camp around it.
Thats simple, here:
Make another invisable object, and this would be the onEnter:
function CamperDamage(%tank,%loopsElapsed)
{
%loopsElapsed++;
%tank.player.hurtme(2.5);
if ( %loopsElapsed >= 10 || $inGoal[%tank] == false)
return;
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
function *datablock*::OnEnter(%db,%this,%tank)
{
if (%tank.getFlag != -1)
return;
schedule(5000,0,"CamperDamage",%tank);
$inGoal[%tank] = true;
}
function *datablock*::OnLeave(%db,%this,%tank)
{
$inGoal[%tank] = false;
}
DUM DUM XD
Last edited: Friday, April 14, 2006 at 9:05:30 AM
^ and people think I swear..
DUM DUM DUM X/
This will NEVER work.... You think of all those battles around the scrumgoal that people have. Everyone would just die! I think people should stop trying to interfere with the game and play it. Common, just learn how to get around campers instead of finding a way so you can stop them for ever. I love getting pass campers - makes it fun!
A REAL camper would know that to win a game not only do you camp the goal but arrows as well as bounce pads. And to camp at the goal one would just sit as far away as needed from the goal w/o damage being done. I guess we are talking about tanty style camping here? 8o
You can't really have a camperless game imo, the only way to have a camperless game is with a crazy admin :)
Last edited: Saturday, April 15, 2006 at 3:16:55 PM
Sorry, stupid question, but why can't you use the goal as that object?
A suitable object can be made easily to surround the goal, which I am prepared to make, I even have an emitter to cover it and give something like the original effect as described by DJ, but for testing purposes why not use a CTF goal with a clear blank PNG skin?
That will work
Daz
Last edited: Sunday, April 16, 2006 at 5:50:35 AM
Guess I'm a crazzzzzzzy Admin
^emm... I wish I like was u if it was about admins... :S
^^^ If skins are clear-white you'll just get a white goal... :)
And Billy Bob, CannedSplam is a great scriptor and if he says it works it does.
And by the way, don't emmiters have a kind of onenter function too?
Wait... Emmiters... They are objects... Hmmmh
Thats a good idea AC... I think we could do something like:
Function *EMITTERNODE*::OnEnter(%db,%this,%tank)
Worth a shot! :)
DAZZ: I will talk to you about this object...
BTW, I think it would be pretty easy to match this object with the scrum goals... Because we could use the position and rotation already provided by them
Last edited: Sunday, April 16, 2006 at 4:19:35 PM
@ Art Crazy
I have no doubt that he is a great scriptor.. Ive seen the thigns he's done..but from what he just shown me..from me trying that already..it WILL NOT work.
So if u believe in that much...thats fine..just dont take his word for it all the time...OK? ;)
Hey, I just though of something...
If we did follow AC's instruction on emitters... Then does the onEnter effect only when a tank enters the actual bitmap that it is set, or the space the emitter takes?
Something to think about...
Also, Billy is right... I hadnt checked that. Thanks anyway though :) XD
Last edited: Monday, April 17, 2006 at 4:05:42 PM
Ahem... Emm... Little question....
function *datablock*::OnEnter(%db,%this,%tank)
function *datablock*::OnLeave(%db,%this,%tank)
What does '*datablock* need to be, or is it possible leaving it that way?
EDIT - Emm... When I start it as dedicated it shows...
Compiling game/server/scripts/AntiCamper.cs Line: 4 - Syntax error.
>>> Advanced script error report. Line 7.
>>> Some error context, whit ## on the sides of the error halt:
function CamperDamage(%tank,%loopsElapsed)
{
%loopsElapsed++
%tank.##P##layer.hurtme(2.5)
if ( %loopsElapsed >= 10 || $inGoal[$tank] == false)
>>> Error report complete
Last edited: Saturday, April 22, 2006 at 10:15:00 PM
Oh well.... Cassie... I'd like to point out that it should be left... Not leaved.
Secondly, if you are a good enough scriptor to make an admin bot script... Why would this be any problem? 8o
function CamperDamage(%tank,%loopsElapsed)
{
%loopsElapsed++;
%tank.player.hurtme(2.5);
if ( %loopsElapsed >= 10 || $inGoal[%tank] == false)
return;
schedule(1000,0,"CamperDamage",%tank,%loopsElapsed);
}
function *datablock*::OnEnter(%db,%this,%tank)
{
if (%tank.getFlag() != -1)
return;
$inGoal[%this,%tank] = true;
schedule(5000,0,"CamperDamage",%tank);
}
function *datablock*::OnLeave(%db,%this,%tank)
{
$inGoal[%this,%tank] = false;
}
I found some errors, this should theoretically work.
Page : <1> :
Remember -z-'s Anti-Camper Scrum mod? The one with the green cloud around the goal that killed you like fog? I just need the emitter property that gives it damage, like FogEmitter.damage=1. Could anyone help me? (-z-, that might include you.)