Jump to content

I've got questions about combat systems :/


Bigby McDonnell
 Share

You are about to reply to a thread that has been inactive for 3379 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hey!

I hope you're having a great time.

So my questions are about the combat systems in SL (DCS2, CCS, etc.)

1. How does it work the hit system? and by hit I mean, how does it work that someone hit and the other receive damage? Is it the function between meters? (i.e. Meter1 sends through a channel the amount of damage Meter2 should take, and Meter2 receives the information and represents it in the health points???)

2. How do guns work? When you shoot someone, how the meter knows how much damage take from a bullet?

3. How do weapons/fists work? How is developed the script for hitting when it comes to using the Left-click Mouse button + Arrow keys?

 

Beforehand, thank you so much!

-Cheers!

 

Link to comment
Share on other sites

Depends on the combat system, but, in general the established combat systems record hits differently depending on whether you're using a projectile or a melee weapon/fists.

Traditionally, with projectile weapons the projectile reports that it's hit someone and one hud (normally that of player who has been hit) records the damage and also reports back to the hud of the player who has just hit the opponent.   Normally, the bullet or arrow will tell the hud how much damage it's caused, based on its weapon type and where it hit the victim.

Melee weapons are a bit different, in that (traditionally) they've used llSensor on a very tight arc and a very short range.   When you press an arrow key or the mouse key, the control event fires.   This triggers the sensor probe and also plays an animation to make you take a swing at your opponent.   If the sensor detects that your opponent is with x metres and is no more than n degrees either way from directly in front of you, that's a hit.

Nowadays, of course, it makes much more sense to use llCastRay instead of llSensor, or it looks like that on paper.  However, I'm told by people who know a lot more a weapons scripting than do I that that can present some practical difficulties (especially when you're using arrows or spears, which don't travel in a dead straight line), which is probably one reason why people still use sensors and bullets.

Avatars can't hit each other, remember.   Animations are played client side, not server side, so while it might look as if you've just stabbed your opponent, as far as the simulator is concerned, the two of you are just standing there.   No collision events are triggered.   Projectile weapons do, though,  cause collisions.

Link to comment
Share on other sites

The thing I'm amazed by is how fast all the process is... I've played CCS and literally when you hit someone the Health points decrease at the same time, it's incredible that the communication between meters is so fast. Well, except for laggy sims, I've noticed when there are more than 30 people fighting in the same sim it gets so much laggy that your health doesn't decrease but suddenly after some minutes or you crash or you are defeated by all the hits and skills that were stuck.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3379 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...