闪点行动2吧 关注:1,973贴子:52,872
平时会做出一些奇怪的东西,我想发帖分享一下。


IP属地:四川1楼2014-05-16 09:56回复
    function onTimer_change()
    OFP:setTimer("change",5000);
    local target=OFP:getGroupMember("p",math.random(0,OFP:getGroupSize("p")-1));
    if OFP:getSide(target)==0 then
    OFP:setArmy(target,1);
    end
    if OFP:getSide(target)==1 then
    OFP:setArmy(target,0);
    end
    if OFP:getGroupSize("p")<=15 then
    local x,y,z=OFP:getPosition(target);
    add=OFP:spawnEntitySetAtLocation("E",x,y,z);
    end
    end
    function onMissionStart()
    OFP:setInvulnerable("huntercqb",true);
    OFP:addTimer("change",5000);
    end
    function onSpawnedReady( setName, setID, tableOfEntities, errorCode )
    if setID==add then
    for i=1,#tableOfEntities do
    if OFP:getBroadUnitCategory(tableOfEntities[i])=="BROAD_UNIT_SOLDIER" then
    OFP:addToGroup(tableOfEntities[i],"p");
    end
    end
    end
    end


    IP属地:四川6楼2014-05-16 10:16
    收起回复
      狙击任务
      http://pan.baidu.com/s/1pJO7uCN
      不能被发现(Identified)


      IP属地:四川7楼2014-05-16 23:36
      回复
        function onDeath(victim, killer)
        OFP:setAmmoCount("player",10);
        target=victim;
        OFP:showLetterBoxOsd(true);
        OFP:addTimer("dea",100);
        OFP:addTimer("com",1500);--应小于回收时间,否则崩溃;
        end
        function onTimer_dea()
        OFP:selectCamera(target);
        OFP:removeTimer("dea");
        end
        function onTimer_com()
        OFP:selectCamera("player");
        OFP:showLetterBoxOsd(false);
        OFP:removeTimer("com");
        end


        IP属地:四川8楼2014-05-17 13:49
        收起回复
          http://pan.baidu.com/s/1mg4uLCW
          第二个狙击任务。
          找到狙击位置之后就很简单了。


          IP属地:四川10楼2014-05-17 21:51
          回复
            打纸箱,一个无(dou)聊(bi)任务。
            function onMissionStart()
            OFP:spawnEntitySet("E");
            score=0;
            OFP:addTimer("stop",60000);
            end
            function onPlaceableKill(placeable, killer, method)
            OFP:setAmmoCount("player",10);
            score=score+5;
            x,y,z=OFP:getPosition("player");
            x=x+math.random(-10,10);
            z=z+math.random(-10,10);
            y=y+math.random(1,5);
            OFP:spawnEntitySetAtLocation("E",x,y,z);
            OFP:displaySystemMessage(score/5);
            if score==100 then
            OFP:showPopup("great"," full score ! ")
            OFP:missionCompleted();
            end
            end
            function onTimer_stop()
            OFP:showPopup("game over","your score is "..score.." !")
            if score<=55 then
            OFP:missionFailed();
            end
            if score>=60 then
            OFP:missionCompleted();
            end
            end


            IP属地:四川11楼2014-05-18 12:38
            回复


              12楼2014-05-18 12:46
              回复


                13楼2014-05-18 13:01
                回复
                  第二个击毙军官后失败 是不是被发现的原因


                  14楼2014-05-18 13:01
                  收起回复
                    http://pan.baidu.com/s/1ntLnIPz
                    第三个狙击任务,求拓展情境


                    IP属地:四川16楼2014-05-18 18:42
                    收起回复
                      有个狙击刺杀军官任务,代号军刀Codename:Dagger,个人感觉这个任务不错,也是我玩的第一个PLA视角并录像的任务,夜晚潜入 完事就溜,等待直升机撤离,个人认为难度算中上


                      19楼2014-05-18 19:54
                      回复
                        支持


                        IP属地:广东来自Android客户端26楼2014-05-22 22:25
                        回复
                          呵呵


                          IP属地:重庆来自Android客户端27楼2014-05-22 22:46
                          收起回复
                            .........


                            IP属地:重庆来自Android客户端29楼2014-05-28 19:30
                            回复
                              OFP:playOneShotSound类似飞机螺旋桨转动的声音怎么写?


                              IP属地:四川32楼2014-05-30 20:10
                              回复