Calculating ground Z axis.
#1

I want to create a script in which when a player drop a weapon it appears on the ground,the problem is that i'm using a custom map which is on the water and i want to find the z position of the ground on which the player is standing on (the map has multiple floors),so i can set the weapon object's pos according to that position,can anyone help me?
Reply
#2

It's fairly simple really - what you need is the position of the player at time of death, using normal GetPlayerPos. You then add a few units in Z axis to make the pickup stand out of the ground, and done?
Reply
#3

Quote:
Originally Posted by TheCman
Посмотреть сообщение
It's fairly simple really - what you need is the position of the player at time of death, using normal GetPlayerPos. You then add a few units in Z axis to make the pickup stand out of the ground, and done?
What about walls there pal?

If they die near a wall, the pickups won't be where the OP intends them to be... He's meaning similar to the MapAndreas principal where Z axis can be found and place appropriately, but if it's custom mapping, there'll be a problem.

A little more detailed and skilled than just putting the pickup at the spot the player died at.
Reply
#4

Could you explain the problem with walls more clearly please? I don't quite understand the issue. I'm using this method on my server, and it works perfectly.
Reply
#5

Perfect for what you maybe wanting, but to have a radius of 2 and to do a circle of drops, if you die next to a wall, you won't have those pickups accessible...
Reply
#6

He said "a weapon", he never mentioned multiple weapons or a "circle of drops". Are you sure you're not simply trying to disagree with everything I say?

Other than that, if you have a ready-made piece of code that would give him that "circle of drops", sure do post it, I'm sure it would make the OP very happy. If not, I again don't feel like your contributions are constructive.
Reply
#7

Maybe the OP isn't even talking of OnPlayerDeath, and he's got a command of /drop weapon...
Reply
#8

That's possible indeed, but I don't feel like it changes my answer by much: replace "at time of death" with "when entering the command".

So once again: other than disagreeing with me just for the sake of humiliating yourself, do you have anything constructive to add to this conversation?

Otherwise, I believe I provided a clear and sufficient answer, and therefore don't feel the need to add anything more.

EDIT: I had to report your post below for obvious spamming. Thanks for your understanding.

EDIT2: "our" issues. Sure. You're the one highjacking this thread and claiming that my solution doesn't fit the OP's use-case, remember?
Reply
#9

I'm not disagreeing with you for the sake of it, my points are equally as valid as yours... Dragging our issue in another thread into other threads that you are noticed in, simply shows a bad attitude.

Quote:
Originally Posted by TheCman
Посмотреть сообщение
EDIT: I had to report your post below for obvious spamming. Thanks for your understanding.
That'll simply be binned as it's obvious that you are simply reporting someone who is calling you out on several fronts, and you have no avenue to contend with it other than to report it.

After all, as I said, dragging our issues in to other threads just because you are questioned about what your 'suggestion' is, simply shows a bad attitude, and to report those posts simply because you can't handle them, simply shows a terrible one.



So, OP, What is it you are aiming to do in this question...
Reply
#10

ColAndreas - Collision Detection
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)