Simple Jeep Spawn With 2-3 Slots

Discussion in 'Spearhead' started by loeri, Jun 22, 2012.

  1. loeri loeri.tk

    Contributions:
    45
    Specialties:
    Mapper, Scripting, Programming, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    I'm looking for a simple script that spawns a jeep where 2-3 players can enter it. (1 driver, 1 passenger, 1 gunner at cal)
    I have some scripts but i can onyl drive forward and backward and it think its to complicated that one..


    As most attachements are gone i can't find a good working one. :(
  2. loeri loeri.tk

    Contributions:
    45
    Specialties:
    Mapper, Scripting, Programming, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Bump, also does anybody know why a jeep explodes when the map is started? this only happens in sh, when i launch it in bt they dont explode..
  3. Herr Klugscheisser Drinking and Tanking. Perfect together.

    Contributions:
    330
    Specialties:
    Scripting, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Would have to see the script to even guess why a jeep would blow up.


    Even if you attached the players to the jeep they would be standing in it because there are no proper sitting animations you could force on them. There was a mod done done by BlueBrooks that would let you mount the jeep and fire the .50, but the jeep followed a predetermined path while you were on it. So basically you were a sitting duck. Like I said, it looke dpretty goofy with the player model standing there and the .50 firing.
  4. loeri loeri.tk

    Contributions:
    45
    Specialties:
    Mapper, Scripting, Programming, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    Yes i see lol, so the only way to make it is hide the driver, which worked now.

    Now i only need the machinegun work and also there is a bug which makes teh server crash or client is stuck:
    When you spam use button on the jeep..

    How could i delay the leave time on the jeep, i know its like wait 10 but when the player is in the jeep how could you detect that?

    The script that im using is from the mod zzzz_mohdm2 Drivable Tanks 0.5b

    Code:
    wJeepThreeMain:
    //
    thread JeepSpawn
    //
    end
    ////
    JeepSpawn:
    spawn "vehicles/Willys.tik" "targetname" "playerJeep"
    $playerJeep solid
    $playerJeep.origin = ( -2110 -2888 -124)
    $playerJeep.angle = 95
     
    $playerJeep immune bullet
    $playerJeep immune bash
    $playerJeep immune fast_bullet
    $playerJeep immune shotgun
    $playerJeep immune crush
    $playerJeep immune impact
    $playerJeep immune vehicle
    $playerJeep.health = 570
    $playerJeep takedamage
    $playerJeep thread HideTurrets
    $playerJeep thread Gun30
    $playerJeep Thread Jeeptriggergun
    $playerJeep Thread JeepTrigger
    $playerJeep waitThread JeepDeath
    end
    /////
    HideTurrets:
    self.gun = self QueryTurretSlotEntity 0
    self.gun2 = self QueryTurretSlotEntity 1
    self.gun3 = self QueryTurretSlotEntity 2
    //self.gun3 solid
    self.gun3 hide
     
    self.gun2 solid
    self.gun2 maxuseangle 360
    self.gun2 setplayerusable 1
    self.gun2 setusable 1
     
    end
    /////
    ////
    Gun30:
    self.gun = self QueryTurretSlotEntity 0
    self.gun2 = self QueryTurretSlotEntity 1
    self.gun notsolid
    self.gun2 notsolid
    end
    ////
     
    JeepTrigger:
        spawn trigger_use "targetname" "Jeeptrigger8"
        $Jeeptrigger8.origin = $playerJeep.origin
        $Jeeptrigger8.angles = $playerJeep.angles
        $Jeeptrigger8 setsize "-60 -120 0" "60 120 112"
        //$Jeeptrigger8.model = "models/vehicles/jeep.tik"
        $Jeeptrigger8 triggerable
        $Jeeptrigger8 setthread "DriveJeep"
        $Jeeptrigger8 notsolid
        $Jeeptrigger8 glue $playerJeep
        level.inJeep = 0
        level.firstTimeJeep = 1
        level.destroyedJeep = 0
        $playerJeep setcollisionentity $playerJeep.target
    End
     
    JeepTriggergun:
        spawn trigger_use "targetname" "JeeptriggeGun"
        $JeeptriggerGun.origin = $playerJeep.origin
        $JeeptriggerGun.angles = $playerJeep.angles
        $JeeptriggerGun setsize "-120 -60 0" "120 60 112"
        //$JeeptriggerGun.model = "models/vehicles/panzer_tank_europe.tik"
        $JeeptriggerGun triggerable
        $JeeptriggerGun setthread "JeepGunner"
        $JeeptriggerGun notsolid
        $JeeptriggerGun glue $playerJeep
        level.inJeepGun = 0
        level.firstTimeJeepGun = 1
    End
     
    JeepDeath: 
        self waittill death 
        level.destroyedJeep = 1
        self playsound explode_tank
        spawn script_model model models/emitters/explosion_tank.tik "targetname" "jeep1exp"
        $jeep1exp show
        $jeep1exp.origin = self.origin
        $jeep1exp show
        $jeep1exp anim start
        //iprintlnbold "The Jeep has been destroyed"
        exec global/earthquake.scr .23 4 0 0
        radiusdamage self.origin 200 200
        local.damaged = spawn script_model model models/vehicles/Jeep_des.tik
        local.damaged.origin = self.origin
        local.damaged.angles = self.angles
     
        self remove
        wait 3
        $jeep1exp remove
     
    end
    DriveJeep:
    if (level.destroyedJeep == 0)
        {
        $Jeeptrigger8.angles = $playerJeep.angles
            $playerJeep vehiclespeed 385
            $playerJeep waitthread global/VehicleDriveJeep.scr::EnterTank parm.other
         
            if (level.firstTimeJeep == 1)
                {
                level.firstTimeJeep = 0
                }
     
            $playerJeep vehiclespeed 385
            //$playerJeep setcollisionentity $playerJeep.target
            self immune bullet
            self immune fast_bullet
            //self immune grenade
            self immune bash
            self notsolid
            level.inJeep = 1
        }
     
    else
        {
        thread GunJeep
        }
    end
     
    JeepGunner:
    if (level.destroyedJeep == 0)
        {
            $playerJeep vehiclespeed 385
            $playerJeep waitthread global/VehicleGunJeep.scr::EnterTank parm.other
         
            if (level.firstTimeJeepGun == 1)
                {
                level.firstTimeJeepGun = 0
                }
     
            $playerJeep vehiclespeed 385
            //$playerJeep setcollisionentity $playerJeep.target
            self immune bullet
            self immune fast_bullet
            //self immune grenade
            self immune bash
            level.inJeepGun = 1
        }
     
    else
        {
        //iprintlnbold "This Jeep is destroyed"
        }
    end

Share This Page