Raised This Month: $404 Target: $400
 101% 

Disappearance Of The Entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MayroN
Member
Join Date: Aug 2017
Location: Kyiv
Old 10-09-2018 , 19:48   Disappearance Of The Entity
Reply With Quote #1

Help to democat,what would a model escaselas smoothly when killing the enemy.
There she disappears abruptly for the Tusk.
And there is a ready-made example of a smooth disappearance at the end of 10 seconds.
So I can not adjust


Here
PHP Code:
public Task_EntFind(taskid)
{
   new 
ent taskid TASK_ENTFIND;
    
   if(!
pev_valid(ent))   {
      
remove_task(taskid);
      return;
   }
    
   new 
iEnemy pev(entpev_iuser4);
    
   if (!
is_user_alive(iEnemy))   {
      
remove_task(taskid);
      
remove_task(ent TASK_ENTREMOVE);
      
set_pev(entpev_flagspev(entpev_flags) | FL_KILLME);
      return;
   }

An example of a ready-made "smooth"
PHP Code:
public UltimateThink(ent)   {
   if (!
pev_valid(ent)) {
      return 
HAM_IGNORED;
   }
    
   switch(
pev(entpev_impulse))   {
      case 
STATUS_NONE:{
         
set_pev(entpev_movetypeMOVETYPE_FLY);
         
set_pev(entpev_solidSOLID_NOT);
         
set_pev(entpev_rendermodekRenderTransAlpha);
          
         
set_pev(entpev_renderamt100.0);
         
set_pev(entpev_velocityFloat:{0.00.0VERTICAL_SPEED});
         
set_pev(entpev_avelocityFloat:{0.0HORISONTAL_SPEED0.0})
         
set_pev(entpev_impulseSTATUS_EFFECT);      
      }
      case 
STATUS_EFFECT:   {
         if (
pev(entpev_renderamt) > 0.0) {
            
set_pev(entpev_renderamtfloatmax(0.0pev(entpev_renderamt) - STEP));
         } else {
            
set_pev(entpev_flagsFL_KILLME);
            
set_pev(entpev_impulseSTATUS_KILL);
         }
      }
   }
    
   
set_pev(ent,pev_nextthink,get_gametime() + 0.1)
    
   return 
HAM_SUPERCEDE;

All code

PHP Code:
#define ENTANGLE_TIME   10.0    // Время исчезновения модели Ультимейта
 
#define TASK_ENTREMOVE 0x917
 
#define TASK_ENTFIND   648911118719
#define FIND_TIME   0.1      // Время исчезновения Ульты ( секунды )
 
#define STEP 10.0
#define VERTICAL_SPEED 20.0
#define HORISONTAL_SPEED 60.0
 
enum (+= 1) {
   
STATUS_NONE 0,
   
STATUS_EFFECT,
   
STATUS_KILL
}
 
public 
NE_ULT_EntangleEffectid )
{
    new 
Float:flOrigin[3]
    
pev(idpev_originflOrigin)
    new 
ent=engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
 
    
engfunc(EngFunc_SetOriginentflOrigin);
 
    switch(
random_num(0,2))
    {
        case 
0engfunc(EngFunc_SetModelentsz_MODEL)
        case 
1engfunc(EngFunc_SetModelentsz_MODEL2)
        case 
2engfunc(EngFunc_SetModelentsz_MODEL3)
    }
 
    
set_pev(entpev_classname"elf_ultimate");
    
set_pev(entpev_sequence0)
    
set_pev(entpev_framerate1.0)
    
set_pev(entpev_iuser4id)
 
    
set_task(FIND_TIME"Task_EntFind"ent TASK_ENTFIND__"b");
 
    
set_pev(entpev_nextthinkget_gametime() + ENTANGLE_TIME)
    
set_pev(entpev_rendermodekRenderFxNone);
 
     
     
    
// Play the entangle sound
    
emit_soundidCHAN_STATICg_szSounds[SOUND_ENTANGLING], 1.0ATTN_NORM0PITCH_NORM );
 
    return 
PLUGIN_HANDLED
}
 
public 
UltimateThink(ent)   {
   if (!
pev_valid(ent)) {
      return 
HAM_IGNORED;
   }
    
   switch(
pev(entpev_impulse))   {
      case 
STATUS_NONE:{
         
set_pev(entpev_movetypeMOVETYPE_FLY);
         
set_pev(entpev_solidSOLID_NOT);
         
set_pev(entpev_rendermodekRenderTransAlpha);
          
         
set_pev(entpev_renderamt100.0);
         
set_pev(entpev_velocityFloat:{0.00.0VERTICAL_SPEED});
         
set_pev(entpev_avelocityFloat:{0.0HORISONTAL_SPEED0.0})
         
set_pev(entpev_impulseSTATUS_EFFECT);      
      }
      case 
STATUS_EFFECT:   {
         if (
pev(entpev_renderamt) > 0.0) {
            
set_pev(entpev_renderamtfloatmax(0.0pev(entpev_renderamt) - STEP));
         } else {
            
set_pev(entpev_flagsFL_KILLME);
            
set_pev(entpev_impulseSTATUS_KILL);
         }
      }
   }
    
   
set_pev(ent,pev_nextthink,get_gametime() + 0.1)
    
   return 
HAM_SUPERCEDE;
}
 
public 
Task_EntFind(taskid)
{
   new 
ent taskid TASK_ENTFIND;
    
   if(!
pev_valid(ent))   {
      
remove_task(taskid);
      return;
   }
    
   new 
iEnemy pev(entpev_iuser4);
    
   if (!
is_user_alive(iEnemy))   {
      
remove_task(taskid);
      
remove_task(ent TASK_ENTREMOVE);
      
set_pev(entpev_flagspev(entpev_flags) | FL_KILLME);
      return;
   }

MayroN is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: Brazil 🇧🇷
Old 10-12-2018 , 23:13   Re: Disappearance Of The Entity
Reply With Quote #2

What?
__________________
Working with $$$ paid plugins. Contact below (ONLY FOR NEGOTIATIONS)
  • Skype: crazy.770
  • Steam: crazy770
  • Discord: CrazY.#5317
Feel free to check my work at https://conceptstrike.blogspot.com

Check my Aliens vs. Predator: currently offline
CrazY. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:53.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode