Raised This Month: $ Target: $400
 0% 

Faking a player entity?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-24-2007 , 17:10   Re: Faking a player entity?
Reply With Quote #4

Welcome to the world of making a Artificial Intelligence

It's not as easy as it looks, you have to process frame by frame what he would have to do, walk forward, aim and others...

I found this function from "Arena" of "MrDev", but i am not sure of how to make them shoot
PHP Code:
stock Set_AimingCoreIDTargetID )
{
    new 
Float:CoreAngles[3] = { 0.00.00.0 };
    
    new 
Float:CoreOrigin[3];
    
pev(CoreIDpev_originCoreOrigin );
    
    new 
Float:TargetOrigin[3];
    
pev(TargetIDpev_originTargetOrigin );
    
    new 
anglemode:Mode degrees;
    
    new 
Float:DeltaOrigin[3];
    for ( new 
03i++ )
        
DeltaOrigin[i] = CoreOrigin[i] - TargetOrigin[i];
        
    
CoreAngles[x] = floatatanDeltaOrigin[z] / Distance2DDeltaOrigin[x], DeltaOrigin[y] ), Mode ) ;
    
CoreAngles[y] = floatatanDeltaOrigin[y] / DeltaOrigin[x], Mode );
    
    ( 
DeltaOrigin[x] >= 0.0 ) ? ( CoreAngles[y] += 180.0 ): ( CoreAngles[y] += 0.0 )
    
    
set_pev(CoreIDpev_anglesCoreAngles,);
    
set_pev(CoreIDpev_fixangle);

Well, good luck in making the first AI for AMXX
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
 



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 06:39.


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