Results 1 to 4 of 4

Thread: [SCRIPT] Usable Flak88 for the map The Hunt (modification)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default [SCRIPT] Usable Flak88 for the map The Hunt (modification)

    This is modification from another mod created from another person.

    I only have credits for the moditification.


    //*****************************************************************\\
    // Player Usable Flak-88 A.T. Gun from the SFX Mod Menu \\
    // Usable Flak88 and Nebelwerfer Script by Cobra {sfx} & PacRac {sfx} \\
    // www.Mods-R-us.net \\
    //*************************************************************************\\


    main:

    // --------------------------------------- Flak Missing sounds ----------------------------------------------------------------------------

    local.master = spawn scriptmaster

    local.master aliascache flak_snd_move sound/vehicle/veh_tank_turret1.wav soundparms 0.9 0.2 0.9 0.2 800 4000 auto loaded maps "m dm obj"
    local.master aliascache flak_snd_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_reload sound/weapons/fire/TankFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 auto loaded maps "dm obj"

    // ---------------------------------------------------------------------------------------------------------------------------------------

    //local.base = spawn models/statweapons/flak88base.tik "classname" "script_model"
    //local.base.targetname = "Flak88Base"
    //$Flak88Base.angles = local.angle
    //$Flak88Base solid
    //$Flak88Base.origin = local.origin

    //local.ent = spawn models/statweapons/flak88turret.tik
    //local.ent.targetname = "Flak88"
    //$Flak88.angles = local.angle
    //$Flak88 setsize ( -80 -80 0 ) ( 80 80 158 )
    //$Flak88.damagemdl= models/statweapons/flak88_d.tik
    //$Flak88.origin = $Flak88Base.origin + ( 0 0 64 )


    $flak88_weapon1 thread ResetFlak
    $flak88_weapon1.damagemodel = "models/statweapons/flak88_d.tik"

    local.trig = spawn trigger_multiple "health" "200" "spawnflags" "128"
    local.trig.origin = $flak88_weapon1.origin
    local.trig setsize ( -60 -60 0 ) ( 60 60 170 )
    local.trig.target1 = $flak88_weapon1
    local.trig.target2 = $flak88_base1
    local.trig setthread ImDead

    end


    // Flak88 Bit
    ImDead:
    self nottriggerable
    self thread spawn_fx "emitters/mortar_dirt_nebelwerfer.tik" 1.2
    $flak88_weapon1_explosive remove
    self playsound explode_flak88
    radiusdamage self.origin 500 300
    self thread spawn_fx models/fx/fx_flak88_explosion.tik 1.1
    local.dam = spawn script_model model self.target1.damagemodel
    local.dam.origin = self.origin
    local.dam.angles = self.target1.angles
    self.target1 delete
    wait 3
    self.target2 thread CleanUP
    local.dam thread CleanUP
    self delete

    end



    spawn_fx local.fx local.scale:
    local.temp = spawn script_model model local.fx scale local.scale
    local.temp.origin = self.origin + ( 0 0 -50 )
    local.temp anim start
    radiusdamage local.temp.origin 800 384
    end


    ResetFlak:
    waitframe
    self.corona = 0
    local.trig3 = spawn trigger_useonce
    local.trig3.origin = self.origin
    local.trig3 setsize ( -170 -170 0 ) ( 170 170 110 )
    local.trig3 waittill trigger
    thread playergetin_flak
    end

    playergetin_flak:
    self dmprojectile models/projectiles/tigercannonshell.tik
    local.flakplayer = parm.other
    local.team = local.flakplayer.dmteam
    self.gunner = local.flakplayer

    //local.flakplayer safeholster 1
    local.flakplayer notsolid
    local.flakplayer hide
    wait 1
    local.flakplayer physics_off
    self.corona = 1

    while(local.flakplayer!= NIL && local.flakplayer!= NULL)
    {
    local.flakplayer.origin = self.origin + ( -10 0 20 ) // I like this Viewing Position!! Dunno if it is the best! :P
    local.turretmove = local.flakplayer thread find_spot

    self setaimtarget local.turretmove
    waitframe


    if(local.flakplayer.fireheld && self.flakfiredelay != 0)
    {
    self waitthread fire_flak

    self thread reload_flak
    }


    if(local.flakplayer.useheld)
    {
    while(local.flakplayer.useheld)
    waitframe
    local.flakplayer.origin = self.origin + ( 0 0 200 )
    local.flakplayer.viewangles = (self.angles[0] self.angles[1] 0)
    local.flakplayer physics_on
    local.flakplayer show
    local.flakplayer uselast
    local.flakplayer = NIL
    self.corona = 0
    self thread ResetFlak
    }

    if(local.flakplayer.dmteam == spectator)
    {
    waitframe
    local.flakplayer.origin = self.origin + ( 0 0 200 )
    local.flakplayer.viewangles = (self.angles[0] self.angles[1] 0)
    local.flakplayer physics_on
    local.flakplayer = NIL
    self.corona = 0
    self thread ResetFlak
    }
    if(local.flakplayer.dmteam != local.team)
    {
    waitframe
    local.flakplayer stufftext "reconnect"
    local.flakplayer physics_on
    local.flakplayer = NIL
    }
    if(local.player != NIL)
    {
    waitframe
    self.driver = NIL
    self.driver physics_on
    self.corona = 0
    self thread ResetFlak
    }
    waitframe
    }


    if(local.player != NIL || local.player != NULL)
    {
    end
    }


    end

    reload_flak:
    self.flakfiredelay = 0
    wait 5
    self.flakfiredelay = 1

    end

    fire_flak:
    self playsound flak_snd_fire3
    self anim fire
    wait .5
    self playsound flak_reload

    end

    find_spot: // Turret movement attached to player ** Thank you bdbodger ;)

    local.fwd_vec = (angles_toforward self.viewangles)
    local.start = self gettagposition "Bip01 Head"
    local.range = 5000
    local.hit_location = trace (local.start - local.fwd_vec * 56) (local.start + local.fwd_vec * local.range ) 0
    local.flakent = spawn script_origin origin (local.hit_location - ( 0 0 32 )) //32

    end local.flakent

    Last edited by DoubleKill; April 20th, 2019 at 03:42 AM.

Posting Permissions

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