Raised This Month: $ Target: $400
 0% 

An alternative fix would be to set velocity on the player if on top of the entity whe


  
 
 
Thread Tools Display Modes
Author Message
gtpunkt
Veteran Member
Join Date: Dec 2008
Location: Berlin
Old 08-30-2011 , 13:35   An alternative fix would be to set velocity on the player if on top of the entity whe
#1

Quote:
An entity cannot move up if something is blocking it.
Therefore, you cannot make it continue to bounce if a player is on top.
An alternative fix would be to set velocity on the player if on top of the entity when you set velocity on the entity..
kann mir jemand dabei helfen?


PHP Code:
   case BOUNCE_BHOP:
  {
   
set_pev(iEntitypev_movetypeMOVETYPE_TOSS);
   
set_task(0.1,"bounce_bhop",iEntity);
  }
____________________________
public bounce_bhop(iEntity)
{
 if ( 
IsBlock(iEntity) )
 {
  new 
block_type entity_get_int(iEntityEV_INT_body);
  if(
pev_valid(iEntity) && block_type == BOUNCE_BHOP)
  {
 
   static 
property[5];
   
GetProperty(iEntity1property);
   if(
pev(iEntitypev_flags)&FL_ONGROUND)
   {
    new 
Float:velocity[3];
    
velocity[2] = str_to_float(property);
    
set_pev(iEntitypev_velocityvelocity);
   }
   
set_task(0.1"bounce_bhop"iEntity);
  }
 }


Last edited by gtpunkt; 09-02-2011 at 07:39.
gtpunkt is offline
Send a message via Skype™ to gtpunkt
 



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 14:57.


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