Jump to content
主视角中国

开炮FLAK88


moh8888

Recommended Posts

只需加入如下语句:

在MAP.SCR中:

level waittill spawn 在这一行下

///////////

local.flakbase = spawn models/statweapons/flak88base.tik

local.flakbase.origin = ( 18.860 2906.859 240.125 )

local.flakbase.angles = ( 0.000 270.242 0.000 )

local.flak = spawn models/statweapons/flak88turret.tik targetname flak88

local.flak.origin = ( 18.860 2906.859 296.125 )

local.flak.angles = ( 0.000 270.242 0.000 )

local.flak exec global/flakfire.scr

还有一个flakfire.scr 文件要放在

main/global/下就完成了!

那个文件俺flakfire.scr还得找个存放的临时区,找到后在公布!

Link to comment
Share on other sites

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

//www.mohchina.com

//2004.8.13 88

//将此文件起名为flakfire.scr放在main/global/下

main:

local.master = spawn scriptmaster

//Flak 88 gun

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 "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 "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 "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 "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 "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 "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 "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 "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 "dm obj"

//www.mohchina.com

local.master aliascache flak88_reload sound/null.wav soundparms 1.2 0.2 0.9 0.2 800 4000 weapon loaded maps "dm obj"

self dmprojectile models/projectiles/tigercannonshell.tik

local.trigger = spawn trigger_multiple origin self.origin

local.trigger setsize ( -200 -200 -50 ) ( 200 200 100 )

local.trigger.target = self

while(1)

{

local.trigger waittill trigger

local.trigger waitthread get_ready_to_fire

}

end

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

get_ready_to_fire:

local.player = parm.other

while(local.player istouching self)

{

if(local.player.fireheld == 1)

{

local.shot_org = local.player thread find_spot

self.target waitthread fire_cannon local.shot_org

local.shot_org immediateremove

wait 2

}

waitframe

}

end

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

find_spot:

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 * 64) (local.start + local.fwd_vec * local.range ) 0

local.ent = spawn script_origin origin (local.hit_location - ( 0 0 32 ))

end local.ent

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

fire_cannon local.arty:

self setaimtarget local.arty

self waittill ontarget

self anim fire

local.arty immediateremove

end

//这样就行了,简单吧?

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

访客
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 创建新的...