Announcement

Collapse
No announcement yet.

I am trying to make a vehicle without a driver

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I am trying to make a vehicle without a driver

    Hello,
    I am trying to put in my level a vehicle that is driven by the Ai, The ai is to drive the land vehicle around and attempt to hit the player with it.

    I have tried to make a PlayerSpawnManager, But as soon as the characters spawn they jump right out, Except the Assault spaceship

    I took the kDriverLeave from the Assault SpaceShip and slapped it into a new class that extended the Scorpion class

    Code:
    function bool KDriverLeave( bool bForceLeave )
    {
    	if ( bForceLeave )	// Hack so you can't exit SpaceFighters with the "Use" Key.
    	{
    		if ( super.KDriverLeave( bForceLeave ) )
    		{
    			if ( !bDeleteMe && !IsInState('Dying') )
    				Destroy();
    		}
    		else return false;
    	}
    	else
    	{
    		TargetUnSet();
    		return false;
    	}
    }
    This hacks it so I can't leave the vehicle, but the bots don't seem to have any problems with leaving

    Could someone help me keep them in?

    #2
    hmm, no idea. was thinking you would do something like the bautoturret thing with a driver like bautodriver hehe.

    anyway no idea but it should be something like
    bnoneplayervehile set on driver, this should allow you to only do passenger seats and then make your bautodriver.....

    ohwell, hope you find a way to make it work.

    Comment


      #3
      Monsters are pawns, and so are vehicles...
      I've not tried this myself, but in theory, it should be possible to hax a vehicle pawn that is directly controlled by a MonsterController (the ones that control Invasion monsters).

      Since default monster behaviour is to rush towards the nearest player (unless you specifically code some special "attacks") you should get your run-over behaviour.

      There's a Wiki page called BulldogPlayer that might help you here - like I say I've not tried it personally, but it's an idea.

      Comment


        #4
        I believe KDriverLeave only works on SpaceFighters, because SpaceFighters and ONSWheeledVehicles are totally different classes.

        Comment


          #5
          don't space fighters come from the same spot? give me a sec to check....
          and yes spacefighers are AS vehicles which both AS and ONS vehicles spawn from the same Vehicle file..
          Vehicle.uc

          Comment


            #6
            I read somewhere that you could set the driver to 'none' if you spawn directly into it, but unfortunately my skills aren't the best,

            I just don't know how to set it to none
            and the KDriverLeave does work for ONS, what I posted works for player characters only.

            Comment


              #7
              Simple way to disallow driver from leaving:

              Code:
              defaultproperties
              {
                    bDriverCannotLeaveVehicle=True
              }

              Comment


                #8
                Originally posted by .:..: View Post
                Simple way to disallow driver from leaving:

                Code:
                defaultproperties
                {
                      bDriverCannotLeaveVehicle=True
                }
                .... Wow.

                To bad it came a couple hours too late, we changed the vehicle to the spacefighter, which still works and is fun, but thats X billion easier. Thanks.

                Comment

                Working...
                X