Author Topic: Prop Hunt ■ Update Out  (Read 11770 times)

Tis not working for me.
I am aware the first release isn't working - pre-release 2 will be downloadable shortly.

Code: [Select]
datablock triggerData(someTriggerData)
{
tickPeriodMS = 100;
};
function someTriggerData::onEnterTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onLeaveTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onTickTrigger(%this, %trigger, %obj)
{
//stuff
}
new trigger(theActualTrigger)
{
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
datablock = someTriggerData;
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
};
if this is what you were looking for, have fun

Code: [Select]
datablock triggerData(someTriggerData)
{
tickPeriodMS = 100;
};
function someTriggerData::onEnterTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onLeaveTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onTickTrigger(%this, %trigger, %obj)
{
//stuff
}
new trigger(theActualTrigger)
{
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
datablock = someTriggerData;
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
};
if this is what you were looking for, have fun
Woah, that's actually really easy. Thanks.

You should give the Prop team some item that can fakekill bricks, then we could fakekill something and take it's place

Although maybe that should be a preference or something, since it's already hard to find people

Hey, can you make it so that hunters can't move when they're blinded?

09/28/13
Squashed some bugs, added map boundaries and prop rotation.

Hey, can you make it so that hunters can't move when they're blinded?
Yeah this would be good, and if you team switch into a hunter when you start as a prop you aren't blinded.

The blindness is easily bypassed. You should just stuff the hunters in a box for 30 seconds.

The blindness is easily bypassed. You should just stuff the hunters in a box for 30 seconds.

this

if you team switch into a hunter when you start as a prop you aren't blinded.

and this

prop rotation.

Please add 1 to the angleID. Attempting to look at yourself just rotates it and prevents you from lining up your brick.

Code: [Select]
function Player::isMoving(%p)
{
if(vectorLen(%p.getVelocity())>0.1)
return true;
if(vectorDist(%p.mLastPos,%p.getPosition())>0.5)
return true;
if(%p.mLastEye!$=%p.getEyeVector())
return true;
return false;
}
can be turned to
Code: [Select]
function Player::isMoving(%p)
{
if(vectorLen(%p.getVelocity())>0.1 || %p.mLastEye!$=%p.getEyeVector() || vectorDist(%p.mLastPos,%p.getPosition())>0.5)
return true;
return false;
}

It wouldn't make much of a difference, but it is generally a bad practice in programming to do that.

Code: [Select]
function Player::isMoving(%p)
{
if(vectorLen(%p.getVelocity())>0.1)
return true;
if(vectorDist(%p.mLastPos,%p.getPosition())>0.5)
return true;
if(%p.mLastEye!$=%p.getEyeVector())
return true;
return false;
}
can be turned to
Code: [Select]
function Player::isMoving(%p)
{
if(vectorLen(%p.getVelocity())>0.1 || %p.mLastEye!$=%p.getEyeVector() || vectorDist(%p.mLastPos,%p.getPosition())>0.5)
return true;
return false;
}

It wouldn't make much of a difference, but it is generally a bad practice in programming to do that.
Wouldn't it end up getting parsed the same way?

I'm not sure shortening 4 minuscule calculations makes a difference...

Wouldn't it end up getting parsed the same way?

I'm not sure shortening 4 minuscule calculations makes a difference...
Like I said, it doesn't make much of a difference but it's is a good practice as a programmer. It means the same exact thing. Less lines of code too.

-Edit-

It is a good practice for example when someone is writing a huge game, saving those calculations can mean a lot when trying to process information. I understand that in this case it wouldn't change a thing, but it's good to get into the habit of doing it.
« Last Edit: September 29, 2013, 06:54:28 PM by Scriode »

Like I said, it doesn't make much of a difference but it's is a good practice as a programmer. It means the same exact thing. Less lines of code too.

No, it's really not.

Readability is a fundamental part of "good practice" and cramming everything into as few lines as possible never helped anyone with readability. You're 14 or something, don't go preaching things you pulled out of your ass.

No, it's really not.

Readability is a fundamental part of "good practice" and cramming everything into as few lines as possible never helped anyone with readability. You're 14 or something, don't go preaching things you pulled out of your ass.
Ha. Ha. Let's just right a bunch of different ways to 'return true;' in different if statements. What is the literal point in that? I don't know about you, but reading one line is just as easy as reading a bunch of if statements.