
Posts
605
Respect
52Add +1
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
if theres a wall in the way you will go to the wall but not threw it that would take a little more code
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
init()
{
players = get_players();
for(i = 0; i<players.size ; i++)
{
players[i] thread blink_main();
}
}
blink_main()
{
angles = self GetPlayerAngles();
ang_fw = anglestoforward( angles );
while(1)
{
if (self meleebuttonpressed())
{
iprintln("ismeleeing");
// get the new destination 200 untis forward
destination = self.origin + vectorscale( ang_fw, 500);
ground_org = groundpos( destination+(0,0,35) );
// do a bullettrace to check for walls etc
if( bullettracepassed( self.origin+(0,0,30), ground_org+(0,0,30), false, self ) )
{
self dontinterpolate();
self setorigin( ground_org );
}
wait 0.1;
}
if (!self meleebuttonpressed())
{
iprintln("Not Meleeing");
wait 0.1;
}
else
{
continue;
wait 0.1;
}
}
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
Can anyone explain how dontInterpolate() works? I've read the Script Reference but have no idea what it says...
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
destination1 = self.origin + ( anglesToForward( self.angles ) * 40 );
destination = playerPhysicsTrace( self.origin, destination1 ) + ( anglesToForward( self.angles ) * 40 );
destination3 = playerPhysicsTrace( destination, destination + ( 0, 0, -1000 ) );
if ( destination != ( destination1 + ( anglesToForward( self.angles ) * 40 ) ) || distance( destination3, destination ) > 50 )
{
shield delete();
self setweaponammoclip( weapname, 1 );
continue;
}
destination1 = self.origin + ( anglesToForward( self.angles ) * 40 );
destination = playerPhysicsTrace( self.origin, destination1 ) + ( anglesToForward( self.angles ) * 40 );