Announcement

Collapse
No announcement yet.

Help With modding a raptor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Thanks for the help. Do vehicles compile with the ucc make program, i have used it to compile weapons just fine, but it is asking for the superclass files for the vehicles, but it didn't for the weapons. Should i be using a different program to compile the vehicles.

    Leave a comment:


  • replied
    Sniper on a raptor might be hard to use, considering its floatin back and forth.. Might want to add a 30 second stablizor like on Frag.Ops where if u hit Sprint it holds still and doesnt move.

    Leave a comment:


  • replied
    Here's how I handle zooming in our Lightning Tank:
    Code:
    class myVehicle extends ONSVehicle;
    
    var(Zoom)       float           ZoomLevel;
    var(Zoom)       float           ZoomLevelMax;
    var(Zoom)       Sound           ZoomSound;
    var(Zoom)       bool            bWasBehindView;
    
    /** Overlay: Draw camera overlay. */
    event function DrawHUD(Canvas C)
    {
        super.DrawHUD(C);
    
        DrawCameraOverlay(C);
    }
    
    /** Overlay: Draw camera overlay. */
    function DrawCameraOverlay(Canvas C)
    {
        local PlayerController PC;
    
        PC = PlayerController(Controller);
    
        if(IsLocallyControlled()
        && PC != None
        && !PC.bBehindView)
        {
            DrawOverlay(C);
        }
        else
        {
            ActivateOverlay(False);
        }
    }
    
    /** Overlay: Draw camera overlay. */
    function DrawOverlay(Canvas C)
    {
        local float Offset;
        local Vector CanvasCenter;
    
        Offset = C.ClipX / C.ClipY;
        CanvasCenter.X = 0.5 * C.SizeX;
        CanvasCenter.Y = 0.5 * C.SizeY;
    
        C.DrawColor.R = 255;
        C.DrawColor.G = 255;
        C.DrawColor.B = 255;
    
        // Moving lines.
        C.SetPos(0,0);
        C.Style = ERenderStyle.STY_Alpha;
        C.DrawColor.A = 50;
        C.DrawTile(Material'DomPLinesGP', C.SizeX, C.SizeY, 0, 0, 256, 256);
    
        // Sniper HUD.
        C.SetPos((C.SizeX - C.SizeY) / 2,0);
        C.Style = ERenderStyle.STY_Normal;
        C.DrawColor.A = 255;
        C.DrawTile(Material'XWeapons_rc.Icons.SniperFocus', C.SizeY, C.SizeY, 0, 0, 512, 512);
    
        // Lens scratches.
        C.SetPos(0,0);
        C.DrawTile(Material'AssaultFilmGrain.filmGrain.dotsNscratches', C.SizeX, C.SizeY, 0, 0, 512, 512);
    }
    
    /** Zoom: Toggle zoom. */
    simulated event AltFire(optional float F)
    {
        local PlayerController PC;
    
        PC = PlayerController(Controller);
    
        if(PC != none)
        {
            PlaySound(ZoomSound, SLOT_Misc,,,,, false);
    
            if (ZoomLevel > 0)
            {
                ZoomLevel = 0;
                PC.SetFOV(pc.DefaultFOV);
                PC.bBehindView = bWasBehindView;
            }
            else
            {
                ZoomLevel = ZoomLevelMax;
                PC.SetFOV(PC.DefaultFOV * ZoomLevel);
                bWasBehindView = PC.bBehindView;
                PC.bBehindView = false;
            }
        }
    }
    
    event Tick (float DeltaTime)
    {
        super.Tick(DeltaTime);
    
        ForceZoom();
    }
    
    /** Zoom: Force first-person perspective on zoom. */
    function ForceZoom()
    {
        local ONSWeaponPawn OWP;
        local PlayerController PC;
    
        OWP = ONSWeaponPawn(Owner);
    
        if(OWP != None)
        {
            PC = PlayerController(OWP.Controller);
    
            if(PC != None
            && ZoomLevel == ZoomLevelMax
            && PC.bBehindView)
            {
                // Tsk, tsk.
                PC.bBehindView = false;
            }
        }
    }
    
    defaultproperties
    {
        ZoomSound=Sound'WeaponSounds.BaseGunTech.BZoomIn1'
        ZoomLevelMax=0.25
    }
    Should be reasonably self-explanatory, but feel free to ask if you have questions.

    Leave a comment:


  • started a topic Help With modding a raptor

    Help With modding a raptor

    I want to modify a raptor, and replace the rockets and plasma gun with a sniper fire and a zoom feature. But I'm not sure exactly what i need to modify in the vehicle weapons, because they seem to work different from normal weapons. I'm new to programing, I am figuring it out somewhat well, but I'm not sure how I get the weapons to integrate.
Working...
X