T:CS mod?

Started by b00n, August 14, 2008, 02:45:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thulsa Doom

Sounds good.
Howzabout no slaying, just put a beacon on everyone OOB when they shouldn't be?

Whitey

It would be great if it could be made to work.  Keep in mind that the coordinates are three dimensional and what is OOB on one level may not be OOB on a lower level.  There are other issues to overcome but i'm sure it's all possible (just not easy). :)

b00n

Yep, I'm sure it's all possible.  I'm not getting bogged down with details just now, they can all be worked out later once it's working in principle.  Right now I just want to get something that triggers some action when a player goes out of bounds.

b00n

#18
Got the basics sorted I think, though a little different from how I planned it.  At the moment it lets you set up a boundary box and then displays a message when you enter it, if you're on the appropriate team.



It doesn't save the box yet.

Quote from: Whitey;241180It would be great if it could be made to work.  Keep in mind that the coordinates are three dimensional and what is OOB on one level may not be OOB on a lower level.

Not a problem as the boundary boxes are three dimensional. :)

Dr Sadako

Some comments/ideas

de_maps: I think even though the bomb is down a message along the lines "Stay close to the objective. Your team need confirmation if the bomb is down before moving in on it." could be sent once even though it is allowed to go there. Also an "OOB" flashing in the side of the screen could be something to consider. What I mean is that the "OOB" flashing text should always flash when you go "OOB" so that you can't use it to check if the bomb is down/planted by going OOB to make it flash or not.

cs maps are the easiest imo. Once the CTs have grabbed the hostages the boundaries are off. This however, is nothing that need to be displayed on screen though. You should still have a OOB flashing in the side if the T goes "OOB" but the punishment removed. It is the Ts responsibility to know if the hostages are taken or not.


I would say that the OOB punishment could be dependent on two things. Distance from player position to nearest boundary and time being OOB. I don't think you need any advanced programming for that.
-=[dMw]=-Dr "Doc" Sadako

"Gravitation is not responsible for people falling in love." Albert Einstein

Zootoxin

Awesome!!
Can you make it slash 25 off their health aswell?

RizZy

I think if it was set to take health from someone for going out of bounds it'd be wrong & against the whole dmw idea for me.

b00n

Quote from: Dr Sadako;241194I would say that the OOB punishment could be dependent on two things. Distance from player position to nearest boundary and time being OOB. I don't think you need any advanced programming for that.

Distance from player position to nearest boundary could be tricky, but time being OOB shouldn't be too hard.

Quote from: VenomAwesome!!
Can you make it slash 25 off their health aswell?

I could, if that were deemed appropriate...  don't think it'd go down well though. ;)

Jewelz^

maybe a timer? so if your not back in bounds in a certain time then you lose abit of health until back to in bounds?

Dr Sadako

Quote from: n00b;241197Distance from player position to nearest boundary could be tricky, but time being OOB shouldn't be too hard.

Not really. Each player has a coordinate in space labeled x,y,z (already in the game) and the boundaries will have planes that are formed by coordinates. The shortest distance is a line (vector) from the coordinate that hits the face of the plane at 90 degrees. Basic algebra. Shouldn't be too hard for us to figure out.
-=[dMw]=-Dr "Doc" Sadako

"Gravitation is not responsible for people falling in love." Albert Einstein

Jabbs

I'm not sure about health reduction now.  Perhaps all that is required (to begin with) are messages?  Maybe with later versions of the script you can add punishments such as beacon?

1st time OOB
A message is displayed
(such as in noobs photobucket link)

"You are out of bounds! Please read the rules! Type MOTD"

2nd time OOB
(in the session or map I don't know) A message displayed to all in server:

"xxx is out of bounds again! If xxx continues to go out of bounds, xxx will be slayed or kicked from the server"

3rd time OOB

Message saying:

"xxx will now be slayed for going out of bounds a third time!"

Kick, slay or whatever the boss guys here think is reasonable/sensible

Maybe the MOTD can be forced to display on the users screen after the first OOB?
Start Folding and get yourself one of those nice new badge thingies, it\'s a good cause.  Check out the stats

[email]jabbs@deadmen.co.uk[/email]

b00n

Quote from: Dr Sadako;241228Not really. Each player has a coordinate in space labeled x,y,z (already in the game) and the boundaries will have planes that are formed by coordinates. The shortest distance is a line (vector) from the coordinate that hits the face of the plane at 90 degrees. Basic algebra. Shouldn't be too hard for us to figure out.

But the boundary is less of a boundary and more of a box.  How do you define which plane of the box you want to test (bear in mind, using the scripting commands I have just now, a box is defined only by two coordinates of opposite corners)?

Also since multiple boxes will need to be defined to cover different areas of a level, it is possible (likely in fact) that there won't always be a vector from the player which intersects a boundary plane at 90 degrees.

Aquilifer

This sounds a pretty easy thing to do, but a wrong game for me (at least in ArmA it would be one evening job).

If the area is defined by multiple boxes, then just test all the boxes. The player is inside if he is inside atleast one box (maybe more than one if the boxes overlap). Testing for a point (player=x,y,z) inside is a box (square) is simple. I suppose you don't even need z coord for the boxes (let's say x,y are the ground coords and not x and z). If there are some special rules when it is allowed then test them too. Maybe add a parameter to allow defining the legal area by defifing the illegal area (sometimes could be much easier that way and some maps the other way)

If somebody is out I would recommend actions based on how long he has been out and not how many times. So the first time would be enough if he stays there. Giving warning for e.g 0sec, 5 sec, 10 sec etc.

Also...Two opposite corners do not define a rectangle in a proper way (not in geometry). You would need 2 corners + angle or like I would prefer: center(x,y), width, height, angle. I would guess you need angle too because the boxes are not probably in the same direction as the coordinate system. I just don't know how you can get the box coords and angle in CS...maybe the corner,corner,angle is easier to get. (special note: If you need all 3 coords (x,y,z) like if needed to test different floors, then you might need not just one angle but basicly 2...I would recommend then center(x,y,z),width,height,length,direction vector,up direction vector, because you can do some handy operations with vectors)

b00n

Quote from: Aquilifer;241247This sounds a pretty easy thing to do, but a wrong game for me (at least in ArmA it would be one evening job).

If the area is defined by multiple boxes, then just test all the boxes. The player is inside if he is inside atleast one box (maybe more than one if the boxes overlap). Testing for a point (player=x,y,z) inside is a box (square) is simple. I suppose you don't even need z coord for the boxes (let's say x,y are the ground coords and not x and z). If there are some special rules when it is allowed then test them too. Maybe add a parameter to allow defining the legal area by defifing the illegal area (sometimes could be much easier that way and some maps the other way)

If somebody is out I would recommend actions based on how long he has been out and not how many times. So the first time would be enough if he stays there. Giving warning for e.g 0sec, 5 sec, 10 sec etc.

Also...Two opposite corners do not define a rectangle in a proper way (not in geometry). You would need 2 corners + angle or like I would prefer: center(x,y), width, height, angle. I would guess you need angle too because the boxes are not probably in the same direction as the coordinate system. I just don't know how you can get the box coords and angle in CS...maybe the corner,corner,angle is easier to get. (special note: If you need all 3 coords (x,y,z) like if needed to test different floors, then you might need not just one angle but basicly 2...I would recommend then center(x,y,z),width,height,length,direction vector,up direction vector, because you can do some handy operations with vectors)

It's actually all much easier than that. :)  It's ok to assume that the boxes never have a rotation (it is never necessary), in which case no angle is required and the coordinates of two opposite corners are adequate for defining the box.  You do need z coord (or y in this case) as two areas above and below one another may not both be in or out of bounds.

The reason I say it is easy is because the scripting system I'm using has a box_trigger method which looks like this:

est_box_trigger(playergroup name coord1 coord2 interval)

The method creates a box which triggers an event whenever it detects a player from the playergroup inside it.  It checks this every interval seconds.  This makes increased penalties for duration in the box easy to do.

Actually setting up the boxes shouldn't be too hard as the majority of levels can be largely covered by one or two huge boxes, with smaller ones where needed.

While I'm on the subject, can anyone confirm if EventScripts is on the server (or could be added)? ES Tools addon for it would also be good.

Whitey

Quote from: n00b;241262While I'm on the subject, can anyone confirm if EventScripts is on the server (or could be added)? ES Tools addon for it would also be good.

We have Metamod and SourceMod but not EventScripts.  I can set it up on our test server "Baltar" once your ready for some testing.