[ H3LP ] Bind on head?
Hey AlliedModders, I dont find any thing about this, then... Its possible to "bind" the player into the head of the victim when the player jump? Example: player jump, if he touch the head, after X seconds use DDL_Kill of fakemeta to kill the victim, and the player continue in the X/Y position in the head of the victim.
Well, I know that is hard but dont impossible.. Have much good programmers, any help are welcome. |
Re: [ H3LP ] Bind on head?
What??? That makes no sense. You'll need to explain in much more detail to make any sense of that.
|
Re: [ H3LP ] Bind on head?
Quote:
|
Re: [ H3LP ] Bind on head?
Ok.. I think that is hard to do.. Any way to do a thing style the attack of facehugger from halflife ? (The AI Jump into the Gordon, and inflict damage).
|
Re: [ H3LP ] Bind on head?
Mhmm.. Well, i got an idea..
Create an invisible entity for each player, using prethink make it stick to the player's head, then register touch to detect if any other player touched that player's head entity, and if so, make the player who touched that entity stick to it's victims head by using prethink, then set a timer and execute ham kill Use a two dimensional boolean arrays in order to transmit the required data from touch to prethink ( g_TouchedHead[33][33], where in the first cell you will store the attacker's index and in the second one the victim's index ) |
Re: [ H3LP ] Bind on head?
Hmm.. well, thanks for the idea Depresie, I will try do some tests.
|
Re: [ H3LP ] Bind on head?
It may be a pain in the ass for you to get this done, but i don't have time to do it myself right now..
Just try to do it yourself, and feel free to post here the code and ask questions |
Re: [ H3LP ] Bind on head?
No problem bro, you already gived to me the code, but in format of logic. I have one doubt, when I create a entity I think its possible change the origin, but how to?
|
Re: [ H3LP ] Bind on head?
You change it's origin using either engine natives ( engfunc ) or fakemeta native set_pev(ent, pev_origin) etc
|
Re: [ H3LP ] Bind on head?
Ok Depresie, I do a code but have one bugs. I dont know much work with entitys, but lets go.
Code:
Now the problems of this code. First, obviously that code is killing the toucher and dont the owner of the entity. Second, I think if exists other entity in the game and a player touch he, I think will execute the "entity_head" class. You can help me to fix that? And, any optimization? Sorry for my English. |
| All times are GMT -4. The time now is 17:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.