GoldenEye: Source Forums
Editing and Customization => Modding Help => Topic started by: Joe on July 07, 2013, 11:14:28 am
-
Hi,
I would like to know this so that I can make DAD mode's (http://forums.geshl2.com/index.php/topic,7378.0.html) script draw resurrection beams from players to the point on a gravestone where they are aiming the beam at, instead of just making the beam be drawn to the gravestone's origin.
I've tried to work out a calculation for this but I haven't been successful. I would bet though, that there is a way to calculate this with the data available to mode scripts.
Available data which I think could be useful for this calculation:
- A vector pointing in the direction of a "long range resurrection ability" user's aim direction.
- This ability's maximum range.
- The user's origin vector.
- The user's rotation vector.
- The gravestone's (capture area object's) origin vector.
- The gravestone's rotation vector.
- The size and shape of the gravestone's entity area box.
-
One problem with this is that as you move the beam it will have to destroy the original one and recreate a new one. This would create a significant network overhead. Although not too terrible, just something to consider.
My suggestion would be to create a random "attachment point" when you first create the beam that is something other than the origin of the grave stone.
It might just be easiest to +15 in the Z direction of the gravestone's origin to start with.
-
Thanks for helping me Killer Monkey.
One problem with this is that as you move the beam it will have to destroy the original one and recreate a new one. This would create a significant network overhead. Although not too terrible, just something to consider.
If this would create a significant network overhead then I will just make the beam go from a player's aim direction vector to the center of the gravestone they are aiming at.
When a player is able to use two or more gravestones at the same time with the LRR ability, I will make this mode's script draw multiple beams from the player's aim direction vector to the gravestones they are using.