AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Help with script (https://forums.alliedmods.net/showthread.php?t=174591)

NeedYourHelp 12-22-2011 12:20

Help with script
 
Hello, I need help finding a function which will make an entity move to a certain point but not like a teleport, by walking / moving over there.

NeedYourHelp 12-22-2011 20:36

Re: Help with script
 
I Found.
close the post.

fysiks 12-22-2011 21:37

Re: Help with script
 
Quote:

Originally Posted by NeedYourHelp (Post 1618025)
I Found.
close the post.

What did you find? I'm curious as I've never seen such a function.

NeedYourHelp 12-24-2011 05:00

Re: Help with script
 
My frend do it.
did you like i give you a server.
so you will can see.
its work ?

Larcyn 12-24-2011 05:58

Re: Help with script
 
Quote:

Originally Posted by NeedYourHelp (Post 1618754)
My frend do it.
did you like i give you a server.
so you will can see.
its work ?

I think he want to see the source code, not the actual plugin running.

micapat 12-24-2011 07:38

Re: Help with script
 
For instance a basic function to move a entity on a flat ground :

PHP Code:

stock npc_MoveToTarget( const npc, const FloatoriginNpc], const FloatoriginTarget], const Floatspeed )
{
    new 
FloatvelocityNpc], Floatlength], Floatdistance;
    
    
length] = originTarget] - originNpc];
    
length] = originTarget] - originNpc];
    
    
distance floatsqrootlength] * length] + length] * length] );
    
    
pevnpcpev_velocityvelocityNpc );
    
velocityNpc] = length] * ( speed distance );
    
velocityNpc] = length] * ( speed distance );
    
set_pevnpcpev_velocityvelocityNpc );
    
    return ( 
velocityNpc] || velocityNpc] || velocityNpc] );




All times are GMT -4. The time now is 20:48.

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