• 0

    posted a message on Traceline FPS Attack Problem

    bump

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    I simply cannot make more then one shootable unit for some reason. (else if doesnt seem to work.)

       while(lv_traceDistance < 100.0) {
        if(lv_pitch < 90){
    	  lv_traceHeight = Tan(lv_pitch) * lv_traceDistance * (-1);
        } else if(lv_pitch > 270) {
            lv_traceHeight = Tan(360 - lv_pitch) * lv_traceDistance;
        }    
        lv_weaponDamage = 30.0;
        lv_tracePoint = PointWithOffsetPolar(lp_cameraPosition, lv_traceDistance, lv_yaw);
        lv_traceWorldHeight = WorldHeight(c_heightMapGround, lv_tracePoint);
        lv_traceRegion = RegionCircle(lv_tracePoint, 1.5);
        lv_closestUnit = libNtve_gf_ClosestUnitToPoint(lv_tracePoint, UnitGroup(null,  c_playerAny, lv_traceRegion, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
     
        
       if(UnitGetType(lv_closestUnit) == "Lyote") {
        lv_unitTypeMax = 0.40; 
        lv_unitTypeMin = - 1.0;
        lv_unitTypeRadius = 0.4375;
        lv_damageMultiplier = 1.0;
        lv_headshotMax = 0.0;
        lv_headshotMin = 0.0; 
        lv_headshotRadius = 0.0;
        lv_legMax = 0.0;
        lv_legMin = 0.0;
        lv_legRadius = 0.375;
        lv_headOffsetEast = 0.0;
        lv_headOffsetWest = 0.0;
        lv_legOffsetEast = 0.0;
        lv_legOffsetWest = 0.0;
        lv_unitRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_unitTypeRadius);
        lv_headshotRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_headshotRadius);
        lv_legRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_legRadius);}
       
    if(UnitGetType(lv_closestUnit) == "Urubu") {
        lv_unitTypeMax = 0.40; 
        lv_unitTypeMin = - 1.0;
        lv_unitTypeRadius = 0.4375;
        lv_damageMultiplier = 1.0;
        lv_headshotMax = 0.0;
        lv_headshotMin = 0.0; 
        lv_headshotRadius = 0.0;
        lv_legMax = 0.0;
        lv_legMin = 0.0;
        lv_legRadius = 0.375;
        lv_headOffsetEast = 0.0;
        lv_headOffsetWest = 0.0;
        lv_legOffsetEast = 0.0;
        lv_legOffsetWest = 0.0;
        lv_unitRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_unitTypeRadius);
        lv_headshotRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_headshotRadius);
        lv_legRegion = RegionCircle(UnitGetPosition(lv_closestUnit), lv_legRadius);}
    
        lv_unitWorldHeight = WorldHeight(c_heightMapGround, UnitGetPosition(lv_closestUnit));
    	
    if(lv_closestUnit != null && 
        lv_closestUnit != gv_mainUnit && 
        lv_closestUnit != gv_cameraFollow && 
        RegionContainsPoint(lv_unitRegion, lv_tracePoint) && 
        lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight > lv_unitTypeMin && 
        lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight < lv_unitTypeMax) {
    		gv_traceline_currentTarget[lp_player] = lv_closestUnit;
    		gv_traceline_currentTargetPoint[lp_player] = lv_tracePoint;
    		gv_traceline_currentTargetHeight[lp_player] = lp_cameraHeight + lv_traceHeight;
          if((lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight > lv_headshotMin) && (lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight < lv_headshotMax) && ((DistanceBetweenPoints(PointWithOffsetPolar(RegionGetCenter(lv_unitRegion), lv_unitTypeRadius / 2.0, (CameraGetYaw(1) - 90.0)), lv_tracePoint) > (DistanceBetweenPoints(RegionGetCenter(lv_unitRegion), lv_tracePoint) - lv_headOffsetEast))) &&
        ((DistanceBetweenPoints(PointWithOffsetPolar(RegionGetCenter(lv_unitRegion), lv_unitTypeRadius / 2.0, (CameraGetYaw(1) + 90.0)), lv_tracePoint) > (DistanceBetweenPoints(RegionGetCenter(lv_unitRegion), lv_tracePoint) - lv_headOffsetWest)))) {	
    	lv_damageMultiplier = 2.0;}
          else if((lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight > lv_legMin) && (lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight < lv_legMax) && (RegionContainsPoint(lv_legRegion, lv_tracePoint) == true)) {
    	lv_damageMultiplier = 0.5;}
    	else if((lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight > lv_unitTypeMin) && (lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight < lv_unitTypeMax)) {
    	lv_damageMultiplier = 1.0;}
    	UnitSetPropertyFixed(lv_closestUnit, c_unitPropLife, (UnitGetPropertyFixed(lv_closestUnit, c_unitPropLife, c_unitPropCurrent) - (lv_weaponDamage * lv_damageMultiplier)));
          PointSetHeight(lv_tracePoint, lp_cameraHeight + lv_traceHeight - lv_traceWorldHeight);
          libNtve_gf_CreateModelAtPoint("GhostSnipeAttackImpact", lv_tracePoint);
            return;
        	} 
    if(lp_cameraHeight + lv_traceHeight <= lv_traceWorldHeight) {
            gv_traceline_currentTarget[lp_player] = null;
            gv_traceline_currentTargetPoint[lp_player] = lv_tracePoint;
            gv_traceline_currentTargetHeight[lp_player] = lp_cameraHeight + lv_traceHeight;
            PointSetHeight(lv_tracePoint, lp_cameraHeight + lv_traceHeight - lv_traceWorldHeight);
            libNtve_gf_CreateModelAtPoint("GhostSnipeAttackImpact", lv_tracePoint);
            return;
        }
        lv_traceDistance += 0.5;
    }
    gv_traceline_currentTarget[lp_player] = null;
    gv_traceline_currentTargetPoint[lp_player] = null;
    gv_traceline_currentTargetHeight[lp_player] = 0.0;
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    Oh. I see what you meant now XD. You have to press ctrl to get to the right gun :/. Forgot to mention

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    hmm. I did change one thing but i thought it would help more then harm. heres an earlier map. it only errors when you try to shoot something so ill place a unit near you to shoot. hopefully that works

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    The problem seems to be when shooting any unit I get an error. I'm sorta new to this so I'm having troubles.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    Could be source of problem.

    lv_leftBottom = lp_pointTwo;} else{ lv_rightBottom = lp_pointTwo; lv_leftBottom = lp_pointOne;} if(PointGetY(lp_pointOne) < PointGetY(lp_pointTwo)) { lv_lowY = lp_pointOne;} else { lv_lowY = lp_pointTwo;}}}

    if((PointGetX(lp_pointOne)) >= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointOne)) >= (PointGetX(lp_pointThree)) && (PointGetX(lp_pointOne)) >= (PointGetX(lp_pointFour))) { lv_highX = lp_pointOne; }

    if((PointGetX(lp_pointOne)) <= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointOne)) <= (PointGetX(lp_pointThree)) && (PointGetX(lp_pointOne)) <= (PointGetX(lp_pointFour))) { lv_lowX = lp_pointOne; }

    if((PointGetX(lp_pointTwo)) >= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointTwo)) >= (PointGetX(lp_pointThree)) && (PointGetX(lp_pointTwo)) >= (PointGetX(lp_pointFour))) { lv_highX = lp_pointTwo; }

    if((PointGetX(lp_pointTwo)) <= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointTwo)) <= (PointGetX(lp_pointThree)) && (PointGetX(lp_pointTwo)) <= (PointGetX(lp_pointFour))) { lv_lowX = lp_pointTwo; }

    if((PointGetX(lp_pointThree)) >= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointThree)) >= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointThree)) >= (PointGetX(lp_pointFour))) { lv_highX = lp_pointThree; }

    if((PointGetX(lp_pointThree)) <= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointThree)) <= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointThree)) <= (PointGetX(lp_pointFour))) { lv_lowX = lp_pointThree; }

    if((PointGetX(lp_pointFour)) >= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointFour)) >= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointFour)) >= (PointGetX(lp_pointThree))) { lv_highX = lp_pointFour; }

    if((PointGetX(lp_pointFour)) <= (PointGetX(lp_pointOne)) && (PointGetX(lp_pointFour)) <= (PointGetX(lp_pointTwo)) && (PointGetX(lp_pointFour)) <= (PointGetX(lp_pointThree))) { lv_lowX = lp_pointFour; } lv_leaningCurve = (PointGetY(lv_lowX) - PointGetY(lv_highX)) / (PointGetX(lv_lowX) - PointGetX(lv_highX)); if(lv_leaningCurve > 0) { lv_curveTop = (PointGetY(lv_leftTop) - PointGetY(lv_leftBottom)) / (PointGetX(lv_leftTop) - PointGetX(lv_leftBottom)); lv_curveBottom = (PointGetY(lv_rightTop) - PointGetY(lv_rightBottom)) / (PointGetX(lv_rightTop) - PointGetX(lv_rightBottom)); lv_lowBottomPoint = lv_rightBottom; lv_lowTopPoint = lv_leftBottom;} if(lv_leaningCurve < 0) { lv_curveTop = (PointGetY(lv_rightBottom) - PointGetY(lv_rightTop)) / (PointGetX(lv_rightBottom) - PointGetX(lv_rightTop)); lv_curveBottom = (PointGetY(lv_leftBottom) - PointGetY(lv_leftTop)) / (PointGetX(lv_leftBottom) - PointGetX(lv_leftTop)); lv_lowBottomPoint = lv_leftTop; lv_lowTopPoint = lv_rightTop;} if(PointGetX(lp_pointCheck) >= PointGetX(lv_leftTop) && PointGetX(lp_pointCheck) <= PointGetX(lv_rightTop)) { lv_curveTop = (PointGetY(lv_leftTop) - PointGetY(lv_rightTop)) / (PointGetX(lv_leftTop) - PointGetX(lv_rightTop)); lv_lowTopPoint = lv_leftTop;} if(PointGetX(lp_pointCheck) >= PointGetX(lv_leftBottom) && PointGetX(lp_pointCheck) <= PointGetX(lv_rightBottom)) { lv_curveBottom = (PointGetY(lv_leftBottom) - PointGetY(lv_rightBottom)) / (PointGetX(lv_leftBottom) - PointGetX(lv_rightBottom)); lv_lowBottomPoint = lv_leftBottom;} if((PointGetY(lp_pointCheck) <= PointGetY(lv_lowTopPoint) + ((PointGetX(lp_pointCheck) - PointGetX(lv_lowTopPoint)) * lv_curveTop)) && (PointGetY(lp_pointCheck) >= PointGetY(lv_lowBottomPoint) + ((PointGetX(lp_pointCheck) - PointGetX(lv_lowBottomPoint)) * lv_curveBottom)) && (PointGetX(lp_pointCheck) <= PointGetX(lv_highX)) && (PointGetX(lp_pointCheck) >= PointGetX(lv_lowX))) { gv_pointInRegion = true;} else{ gv_pointInRegion = false;}

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    bump

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Spawn

    Thanks everyone and thanks for map. Another question for those who know about traceline and shooters, http://forums.sc2mapster.com/development/map-development/5637-traceline-fps-attack-problem/#p6 .

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Spawn

    Thanks for the help! :D It worked. I thinkish.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Spawn

    I was wondering what the trigger was to make something random.(In this case: I want it to be a rare creature that spawns if a number is picked from a random group of numbers.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    bumpitiy

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    Skybox works now but still cannot figure out the problem :S

    Posted in: Miscellaneous Development
  • 0

    posted a message on Looking for a loading screen!

    I could make one with Adobe Illustrator and Photoshop. But it depends what kind of art you wanted, lol.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    PointGetX [Value:0]
    divide by zero
     is what its saying.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline FPS Attack Problem

    I have another, perhaps simpler question to add.
    In my FPS whenever I try to add a skybox it stays black. Halp.

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.