Results 1 to 8 of 8

Thread: Spawn "box"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    while(distance(self,skrzynka)<100) if(self usebuttonpressed())
    {
    self iprintlnbold("TEST");
    }
    so many errors...

    you MUST be sure that self is defined and a player first!, you call this upron gamestart (because you precahced the model there...) so there might be NO player -> self is NOT the player there!

    but here is a corrected while-loop..

    Code:
    while( isDefined( self ) && isPlayer( self ) )
    {
            wait( 0.05 );
    
            if( !self useButtonPressed() )
                    continue;
            else if( distanceSquared( self.origin , blabla.origin ) > 100 * 100 )
                    continue;
    
            self iPrintLnBold( "TEST" );
    }

  2. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (14th March 2013)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •