moh8888 Posted 2004年10月28日 03:36 Posted 2004年10月28日 03:36 dsp文件转换成.map文件后俺用MOHAATOOL打开后是些网状的3D图, 看到了一些士兵的坐标和可打开的门,.... 能打开的门有一个角度,而且可在.SCR中找到名称 俺的问题是那些没有任何标记的门,可能是打不开的,怎么打开呢? 谢谢!
S-22 Posted 2004年10月28日 04:35 Posted 2004年10月28日 04:35 这个得看什么门,有些是假的,只是加上门的贴图,这样的只从脚本改几乎不可能。 有些真门倒是可以修改,譬如单人训练关,两个门都是真的,只是第一个要开启的门加了 locked 。 关于门的角度我做地图的时候可以指定,但是修改脚本实现的可能性不是太大,因为角度已经编译到.bsp里了,或者你去找找角度的参数试试。
S-22 Posted 2004年10月28日 14:16 Posted 2004年10月28日 14:16 也不是所有的门都改不了,譬如OMAHA的一道门可以打开,大概是地图作者原计划的空间更大一些。
moh8888 Posted 2004年10月29日 11:40 Author Posted 2004年10月29日 11:40 .map图中有一个如下程序 { "scale" "1.0" "classname" "vehicle_german_kingtigertank" "model" "vehicles/allied_kingtank.tik" "testanim" "idle" "targetname" "alliedtank" "origin" "-1820.00 4564.00 -16.00" "target" "kingtigertankcollision" "$trigger" "alliedtanktrigger" } 俺想按它原稿的名称加到.SCR中,就是说,在.SCR中 可以用原稿的一切程序,比如这个TANK是可开的... 如何加? 程序是? 谢谢!
S-22 Posted 2004年10月29日 15:12 Posted 2004年10月29日 15:12 .map图中有一个如下程序 { "scale" "1.0" "classname" "vehicle_german_kingtigertank" "model" "vehicles/allied_kingtank.tik" "testanim" "idle" "targetname" "alliedtank" "origin" "-1820.00 4564.00 -16.00" "target" "kingtigertankcollision" "$trigger" "alliedtanktrigger" } 俺想按它原稿的名称加到.SCR中,就是说,在.SCR中 可以用原稿的一切程序,比如这个TANK是可开的... 如何加? 程序是? 谢谢! 这里面的 allied_kingtank.tik 要自己写,在 modtheater.com 的论坛搜索 "drivable tank" 能搜到不少。也有一些其它的办法。譬如: http://www.modtheater.com/forum/showthread.php?t=10683 很多人是从关卡编辑器里直接复制所见即所得生成的脚本的,一般编译后能成功运行后复制比较好,这样可以把可能出现的问题减少到最小。
S-22 Posted 2004年10月30日 14:49 Posted 2004年10月30日 14:49 这2天俺正改俺愿来的TANK程序,只是下TANK后变成无敌的了... Tank的生命值设定为多少?看看某个Tread是不是没有正确完结?
moh8888 Posted 2004年10月31日 04:05 Author Posted 2004年10月31日 04:05 startvehicleinit: level.debug=1 self unlock self unlockmovement self.captured = 0 self.hasdriver = 0 self.driver=null self.speed = 400 self.maxspeed = self.speed self vehiclespeed self.speed self removeondeath 0 self.health = 1000 self rendereffects "-shadow" self solid self takedamage self.drivable = 1 self removeimmune bash self removeimmune bullet self removeimmune fast_bullet self removeimmune shotgun self removeimmune grenade self removeimmune rocket self removeimmune explosion self removeimmune crush self removeimmune falling self removeimmune vehicle if(self.type==2) self vehicleanim add_surfaces self.gun = self queryturretslotentity 0 if(self.turret1) { self.gun = self queryturretslotentity 0 self unlock self.gun unlock self detachturretslot 0 self.gun.origin self.gun remove self spawnturret 0 self.turret1 self.gun = self queryturretslotentity 0 if((self.projectile !=nill)||(self.projectile != null)) self.gun dmprojectile self.projectile //self.gun pitchcaps ( -10 10 0) //self.gun maxyawoffset 50 //self.gun yawcenter 0 self.gun takedamage self.gun solid self.gun rendereffects "-shadow" self.gun removeimmune bash self.gun removeimmune bullet self.gun removeimmune fast_bullet self.gun removeimmune shotgun self.gun removeimmune grenade self.gun removeimmune rocket self.gun removeimmune explosion self.gun removeimmune crush self.gun removeimmune falling self.gun removeimmune vehicle } local.t2 = self queryturretslotentity 1 if (local.t2) local.t2 remove self notsolid if (self.target) { self.collisionent = self.target // self.collisionent notsolid self.collisionent removeimmune bullet self.collisionent removeimmune fast_bullet self.collisionent removeimmune shotgun self.collisionent removeimmune grenade self.collisionent removeimmune rocket self.collisionent removeimmune explosion self.collisionent removeimmune crush self.collisionent removeimmune falling self.collisionent removeimmune vehicle } self removeimmune bash self removeimmune bullet self removeimmune fast_bullet self removeimmune shotgun self removeimmune grenade self removeimmune rocket self removeimmune explosion self removeimmune crush self removeimmune falling self removeimmune vehicle thread tankpain thread waitfordeath thread waitforplayer end //*************************************************************************************************************** running: exec global/playervehiclesound.scr println " running sound script " if(level.debug==1) { while(self) { println (" I am running "+ self.targetname) println (" My type is "+ self.type) println (" My damage model is "+ self.damagemdl) println (" My turret1 is "+ self.turret1) println (" My turret2 is "+ self.turret2) println (" My driver is "+ self.driver) println (" hasdriver= "+ self.hasdriver) wait 6 } } end //*************************************************************************************************************** waitforplayer: while(isalive self) { if !(self) end local.fov = 120 local.usedistance = 200 for(local.playr=1;local.playr { local.distance = vector_length ($player[local.playr].origin - self.origin) if (($player[local.playr].useheld == 1)&&($player[local.playr].invehicle != 1)) { $player[local.playr].invehicle=1 while($player[local.playr].useheld==1) // wait for player to let go of use key waitframe if(self.hasdriver!=1) self thread usevehicle $player[local.playr] } //wait 1 } wait 1 } end //********************************************************************************************************** usevehicle local.player: println " I got to here usevehicle " self.hasdriver=1 self.driver=local.player //self.driver notsolid self attachdriverslot 0 self.driver switch(self.type) { case 1: self.driver hide local.player perferredweapon "88mm Tank Gun" break case 2: self.driver perferredweapon ".30cal Machine Gun" break } println (self + " is waiting for player to get out ") local.player = parm.other while ((IsAlive self) && (self.health > 0) && (self.hasdriver == 1)) // && (self.driver.dmteam == local.dmteam ) && (isalive self.driver) && (self.driver.useheld == 0)) { if(local.player.useheld == 1) // wait for player to let go of use key { local.starttime = level.time local.time = 0 while ((local.player!=NULL) && (IsAlive self) && (local.player.useheld == 1) && (local.time { wait .1 local.time ++ } if (local.time > 1) { println " getting out of vehicle " self waitthread gettingout } waitframe } thread debugtext ("ENDTHREAD waitfortank = " + self) end //------------------------------------ gettingout: self fullstop self notsolid self.collisionent notsolid println (" player getting out of " + self ) local.origin = local.player.origin + (50 50 100) local.player.origin = local.origin switch(self.type) { case 1: self detachdriverslot 0 local.player // (self.origin + self.forwardvector * -500 ) //( self.origin + ( -500 200 500 )) //self.gun = self queryturretslotentity 0 self detachturretslot 0 self.gun.origin local.gunangles = self.gun.angles self.gun remove wait 1 //self spawnturret 0 self.turret1 //self.gun = self queryturretslotentity 0 //if((self.projectile !=nill)||(self.projectile != null)) //self.gun dmprojectile self.projectile break case 2: self detachdriverslot 0 (self.origin + self.forwardvector * -300) //( self.origin + ( 200 200 10 )) self.driver.viewangles= ( 0 0 0 ) self.gun = self queryturretslotentity 0 self detachturretslot 0 self.gun.origin self.gun remove wait 1 self spawnturret 0 self.turret1 self.gun = self queryturretslotentity 0 if((self.projectile !=nill)||(self.projectile != null)) self.gun dmprojectile self.projectile self.gun removeimmune bullet self.gun removeimmune fast_bullet self.gun removeimmune shotgun self.gun removeimmune grenade self.gun removeimmune rocket self.gun removeimmune explosion self.gun removeimmune crush self.gun removeimmune falling self.gun removeimmune vehicle if(self.type==3) self.gun hide break } local.player physics_on local.player show releaseplayer cueplayer local.player solid local.player takedamage local.player removeimmune bash local.player removeimmune bullet local.player removeimmune fast_bullet local.player removeimmune shotgun local.player removeimmune grenade local.player removeimmune rocket local.player removeimmune explosion local.player removeimmune crush local.player removeimmune falling local.player removeimmune vehicle wait 2 self.gun = self queryturretslotentity 0 if (self.gun) { self.gun.angles = local.gunangles self.gun solid self.gun rendereffects "-shadow" } wait 1 self.driver = NULL self.inuse = 0 end } end //*************************************************************************************************************** waitfordeath: self waittill death self.inuse = 1 thread tankexplode end //*************************************************************************************************************** tankpain: local.original_health = self.health local.previoushealth = self.health local.paintime = level.time while (self) { if(self.health end if (self.health { switch(self.type) { case 1: self playsound damage_tank exec global/earthquake.scr .2 4 0 0 break case 2: self playsound opeltruck_damage exec global/earthquake.scr .2 2 0 0 break } if ( (self.health (local.paintime + 5) ) ) { local.paintime = level.time local.health_fraction = (self.health / local.original_health) local.newspeed = self.speed * local.health_fraction if (local.newspeed local.newspeed = 0 self.maxspeed = local.newspeed self vehiclespeed self.maxspeed if (local.health_fraction >= 0.666) { self playsound tank_hurt1 self waitthread tankdamage 1 } else if (local.health_fraction >= 0.333) { self playsound tank_hurt1 self waitthread tankdamage 2 } else { self playsound tank_hurt1 self waitthread tankdamage 3 } } local.previoushealth = self.health } wait .1 } end //*************************************************************************************************************** tankdamage local.smoke: switch(self.type) { case 1: self thread spawn_fx "fx/fx_tank_explosion.tik" self playsound explode_tank thread jitter_large 0 // make the screen shake break case 2: self thread spawn_fx "fx/fx_bike_explosion.tik" self playsound explode_bike1 thread jitter_large 0 // make the screen shake break } if (local.smoke == 3) // turret { self.smoke3o = spawn script_origin self.smoke3o.origin = self.origin self.smoke3 = spawn "models/emitters/linger_smoke.tik" self.smoke3 notsolid self.smoke3 anim start switch(self.type) { case 1: self.smoke3.origin = (self.origin + ( -40 0 130) ) break case 2: case 3: self.smoke3.origin = (self.origin + ( -40 0 80) ) break } self.smoke3 bind self.smoke3o self.smoke3o glue self } else if (local.smoke == 2) // front { self.smoke2o = spawn script_origin self.smoke2o.origin = self.origin self.smoke2 = spawn "models/emitters/linger_smoke.tik" self.smoke2 notsolid self.smoke2 anim start switch(self.type) { case 1: self.smoke2.origin = (self.origin + ( 100 50 60) ) break case 2: case 3: self.smoke2.origin = (self.origin + ( 100 30 30) ) break } self.smoke2 bind self.smoke2o self.smoke2o glue self } else // back { self.smoke1o = spawn script_origin self.smoke1o.origin = self.origin self.smoke1 = spawn "models/emitters/linger_smoke.tik" self.smoke1 notsolid self.smoke1 anim start switch(self.type) { case 1: self.smoke1.origin = (self.origin + ( -200 -50 60) ) break case 2: case 3: self.smoke1.origin = (self.origin + ( -120 -30 30) ) break } self.smoke1 bind self.smoke1o self.smoke1o glue self } end //*************************************************************************************************************** tankexplode: self stop //self.destroyed = 1 local.origin = self.origin local.angles = self.angles self.gun2 = self QueryTurretSlotEntity 1 if (self.gun2) { local.po = self.gun2.origin local.po[2] = local.po[2] + 50 local.t2exp = spawn script_origin local.t2exp.origin = local.po local.t2exp.angles = local.angles switch(self.type) { case 1: local.t2exp thread spawn_fx "fx/fx_tank_explosion.tik" 3 local.t2exp playsound explode_tank radiusdamage local.t2exp.origin 200 200 break case 2: local.t2exp thread spawn_fx "fx/fx_bike_explosion.tik" local.t2exp playsound explode_bike1 radiusdamage local.t2exp.origin 100 100 break } local.fire2 = spawn script_origin local.fire2.origin = local.po local.fire2.angles = local.angles local.fire2 thread spawn_fx "models/emitters/fire.tik" wait 1 } self.gun = self QueryTurretSlotEntity 0 if (self.gun) { //local.po = self.gun.origin //local.po[2] = local.po[2] + 100 //local.exp = spawn script_origin //local.exp.origin = local.po //local.exp.angles = local.angles //switch(self.type) //{ //case 1: //local.exp thread spawn_fx "fx/fx_tank_explosion.tik" //5 //local.exp playsound explode_tank //radiusdamage local.exp.origin 500 200 //break //case 2: //case 3: //local.exp thread spawn_fx "fx/fx_bike_explosion.tik" //local.exp playsound explode_bike1 //radiusdamage local.exp.origin 300 100 //break //} self.gun unlock local.po = self.gun.origin local.po[2] = local.po[2] + 0 local.fire = spawn script_origin local.fire.origin = local.po local.fire.angles = local.angles local.fire thread spawn_fx "models/emitters/fire.tik" wait 1 } local.exp2 = spawn script_origin local.exp2.origin = local.origin local.exp2.angles = local.angles //local.exp2 thread spawn_fx"fx/fx_tank_explosion.tik" 3 local.exp2 playsound explode_tank radiusdamage local.exp2.origin 1000 200 if (self.hasdriver == 1) { self.hasdriver=0 self.gun = self queryturretslotentity 0 self detachturretslot 0 self.gun.origin self.gun remove self detachdriverslot 0 (self.origin + ( 0 0 300)) self spawnturret o self.turret1 self.gun = self queryturretslotentity 0 self.driver show self.driver thread bhit 1000 -1 } if (self.hasgunner == 1) { self.hasgunner=0 self.gun2 = self queryturretslotentity 1 self detachturretslot 1 self.gun2.origin self.gun2 remove self spawnturret 1 self.turret2 self.gun2 = self queryturretslotentity 1 self.gunner show self.gunner thread bhit 1000 -1 } iprintlnbold (self + " has been destroyed.") if(self.type==1) { thread jitter_large 0 self notsolid self.gun notsolid self.gun2 notsolid local.dam = spawn script_model model self.damagemdl local.dam.origin = self.origin local.dam.angles = self.angles self remove //self.gun remove //self.gun2 remove local.temp = randomint 3 if (local.temp == 0) local.model_type = "human/german_panzer_grenadier.tik" if (local.temp == 1) local.model_type = human/german_panzer_obershutze if (local.temp == 2) local.model_type = human/german_panzer_tankcommander local.ent = spawn local.model_type local.ent notsolid local.ent.origin = (self.origin + ( 0 0 100 )) local.ent.angles = self.angles local.ent noticescale 1 local.ent sight 4500 local.ent mindist 2024 local.ent maxdist 2448 local.ent leash 10000 local.ent dontdropweapons local.ent exec global/disable_ai.scr local.ent notsolid local.randomdie = randomint(4) switch(local.randomdie) { case 0: local.ent anim_noclip tank_exit_1 local.ent waittill animdone break case 1: local.ent anim_noclip tank_exit_2 local.ent waittill animdone local.ent.position = "crawl" break case 2: local.ent anim_noclip tank_exit_3 local.ent waittill animdone local.ent.health = 45 break case 3: local.ent anim_noclip tank_exit_4 local.ent waittill animdone local.ent bedead end } wait .7 local.ent solid local.ent exec global/enable_ai.scr local.col = spawn script_origin local.col.origin = local.po local.col.angles = local.angles local.col thread spawn_fx "fx/gas_mushroom_column.tik" 5 local.col playsound explode_tank radiusdamage local.col.origin 500 200 wait 5 } if((self.type==2)||(self.type==3)) { self vehicleanim remove_surfaces self notsolid local.ang=self.angles local.ang[2]=20 self.angles = local.ang self.origin = local.jeep_org self.smoke = spawn "models/emitters/linger_smoke.tik" self.smoke notsolid self.smoke anim start self.smoke.origin = (self.origin + (0 0 60)) //self.smoke glue self } local.po = spawn script_origin local.po = local.origin local.po[2] = local.po[2] + 750 local.mush = spawn script_origin local.mush.origin = local.po local.mush.angles = local.angles if(self.type==1) local.mush thread spawn_fx "fx/gas_mushroom_cloud.tik" 5 else local.mush thread spawn_fx "fx/gas_mushroom_cloud.tik" .5 end //************************************************************************************************************************************** // bullet hit command // bhit [damage| 40 default] [body location| default is chest, -1 is random] [direction| vector] [force to apply| 15 default] //************************************************************************************************************************************** bhit local.damage local.location local.direction local.force: if (local.damage == NIL || local.damage == 0) { local.damage = 40 } if (local.location == NIL) { local.location = 3 } else if (local.location == -1) { local.temp = (randomint 17 + 1) local.location = local.temp } if (local.direction == NIL || local.direction == 0) { local.direction = (0 -1 0) } if (local.force == NIL) { local.force = 15 } //*** set the characters script_damage variable so the player doesn't lose the level self.script_damage = 1 //*** damage the target self exec global/bullethit.scr local.direction local.damage local.force local.location self playsound snd_bh_flesh self.script_damage = 0 end //*************************************************************************************************************** spawn_fx local.fx local.scale: local.temp = spawn script_model model local.fx scale local.scale local.temp.origin = self.origin local.temp anim start wait 5 local.temp remove end //*************************************************************************************************************** spawn_damaged local.model: local.damaged = spawn script_model model local.model local.damaged.origin = self.origin local.damaged.angles = self.angles self.smoke = spawn "models/emitters/linger_smoke.tik" self.smoke notsolid self.smoke anim start self.smoke.origin = (self.origin + (0 0 80)) //self.smoke glue self end //*************************************************************************************************************** //****************************** // jitter large effect // jitter_large [delay] //****************************** jitter_large local.time: if (local.time) wait local.time waitexec global/earthquake.scr .35 10 0 0 waitexec global/earthquake.scr .23 6 0 0 waitexec global/earthquake.scr 1 1 0 0 waitexec global/earthquake.scr 1.25 .3 0 1 end //***************************************************************************************************************
moh8888 Posted 2004年10月31日 11:37 Author Posted 2004年10月31日 11:37 下TANK的程序: //------------------------------------ gettingout: self fullstop self notsolid self.collisionent notsolid println (" player getting out of " + self ) local.origin = local.player.origin + (50 50 100) local.player.origin = local.origin switch(self.type) { case 1: self detachdriverslot 0 local.player // (self.origin + self.forwardvector * -500 ) //( self.origin + ( -500 200 500 )) //self.gun = self queryturretslotentity 0 self detachturretslot 0 self.gun.origin local.gunangles = self.gun.angles self.gun remove wait 1 //self spawnturret 0 self.turret1 //self.gun = self queryturretslotentity 0 //if((self.projectile !=nill)||(self.projectile != null)) //self.gun dmprojectile self.projectile break case 2: self detachdriverslot 0 (self.origin + self.forwardvector * -300) //( self.origin + ( 200 200 10 )) self.driver.viewangles= ( 0 0 0 ) self.gun = self queryturretslotentity 0 self detachturretslot 0 self.gun.origin self.gun remove wait 1 self spawnturret 0 self.turret1 self.gun = self queryturretslotentity 0 if((self.projectile !=nill)||(self.projectile != null)) self.gun dmprojectile self.projectile self.gun removeimmune bullet self.gun removeimmune fast_bullet self.gun removeimmune shotgun self.gun removeimmune grenade self.gun removeimmune rocket self.gun removeimmune explosion self.gun removeimmune crush self.gun removeimmune falling self.gun removeimmune vehicle if(self.type==3) self.gun hide break } local.player physics_on local.player show releaseplayer cueplayer local.player solid local.player takedamage local.player removeimmune bash local.player removeimmune bullet local.player removeimmune fast_bullet local.player removeimmune shotgun local.player removeimmune grenade local.player removeimmune rocket local.player removeimmune explosion local.player removeimmune crush local.player removeimmune falling local.player removeimmune vehicle wait 2 self.gun = self queryturretslotentity 0 if (self.gun) { self.gun.angles = local.gunangles self.gun solid self.gun rendereffects "-shadow" } wait 1 self.driver = NULL self.inuse = 0 end
S-22 Posted 2004年10月31日 12:28 Posted 2004年10月31日 12:28 还是用关卡编辑器建立互动脚本吧,建好后直接复制脚本就行了。10分钟差不多等于手工改1小时,能省不少时间。 这里有两个东东,一个是m1l1的坦克带原始.map文件,一个是坦克教学,我刚才看了一下非常非常全面,希望对你能有所帮助。
moh8888 Posted 2004年11月1日 03:01 Author Posted 2004年11月1日 03:01 谢谢! 从.SCR看好象没有用USE键上下TANK的程序.晚上试.... 俺研究一下,其实俺这个程序是从原来本站的TANK3.1PK3上摘下经过一定的改动,总有一点毛病.... 类型1是TANK,类型2是JEEP 现放在单人图的M113B里,总的说还可以,慢慢来吧...
jarodg Posted 2006年2月20日 08:12 Posted 2006年2月20日 08:12 请问 版主 能否给我 一个mohaatool 软件 我一直在寻找 可却找不到 我的邮箱 changhong252004@yahoo.com.cn 谢谢
moh8888 Posted 2006年2月20日 11:11 Author Posted 2006年2月20日 11:11 是作地图的软件吧?俺是不感兴趣...得找一找... S_22这方面最熟悉了....
S-22 Posted 2006年2月20日 13:47 Posted 2006年2月20日 13:47 请问 版主 能否给我 一个mohaatool 软件 我一直在寻找 可却找不到 我的邮箱 changhong252004@yahoo.com.cn 谢谢 http://www.fpschina.com/index.php?showtopic=973&hl
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new account登录
Already have an account? Sign in here.
现在登录