Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Vector Variable Assign Question

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

  • Vector Variable Assign Question

    Hi!

    I am looking for some newbie help with Vector variable.

    I don't know how to edit the values of an vector variable in realtime, only in the defaultProperties.

    I have this variable in the defaultProperties:

    defaultProperties
    {
    CrossHairCoordinates=(U=256,V=64,UL=64,VL=64)
    }

    I want to change the values "U", "V", "UL" and "VL".

    I tried many things but doesn't work.

    like:

    CrossHairCoordinates = (256,64,64,64);
    or
    CrossHairCoordinates=(U=256,V=64,UL=64,VL=64);

    anyway, I appreciate any kind of help, thanks!

  • #2
    First, that isn't a Vector. A vector has X, Y, and Z components. (But that is really beside the point)

    This should work:
    Code:
    CrossHairCoordinates.U = 256;
    CrossHairCoordinates.V = 64;
    CrossHairCoordinates.UL = 64;
    CrossHairCoordinates.VL = 64;

    Comment


    • #3
      Oh, I thought that was a vector, sorry, hehe

      There is no error when I compile the code, but this doesn't change the cursor even if I call this again: CrosshairImage=Texture2D'TormentoPack01.HUD.h_Cros sHairs'

      :x

      Here is a piece of code:

      Code:
      Switch(FlashLightBrightness)
        {
          case 0:
          BrightnessSpot = 0.f;
          FlashLightBrightness = 1;
          CrossHairCoordinates.U = 256;
          CrossHairCoordinates.V = 448;
          CrossHairCoordinates.UL = 64;
          CrossHairCoordinates.VL = 64;
          CrosshairImage=Texture2D'TormentoPack01.HUD.h_CrossHairs';
          break;
      
          case 1:
          BrightnessSpot = 1.f;
          FlashLightBrightness = 0;
          CrossHairCoordinates.U = 256;
          CrossHairCoordinates.V = 64;
          CrossHairCoordinates.UL = 64;
          CrossHairCoordinates.VL = 64;
          CrosshairImage=Texture2D'TormentoPack01.HUD.h_CrossHairs';
          break;
        }

      Comment


      • #4
        Dude you need to draw the crossahair image, even if you are extending UTWeapon, nothing is magic . That coordinates and the crosshair image will set you up, you need to call a fucntion from the HUD class each DrawHUD() call to display the crosshair

        Comment


        • #5
          But this CrosshairImage=Texture2D'TormentoPack01.HUD.h_Cros sHairs' has a lot of crosshairs made by the udk, it's a unique file, If I change these values from the defaultproperties it works:

          Code:
              CrossHairCoordinates.U = 256;
              CrossHairCoordinates.V = 64;
              CrossHairCoordinates.UL = 64;
              CrossHairCoordinates.VL = 64;
          I tried to change the Crosshair image file in REALTIME, example:

          CrosshairImage=Texture2D'TormentoPack01.HUD.h_Cros sHairs';

          to

          CrosshairImage=Texture2D'TormentoPack01.HUD.h_Cros sHairs02'; and it works. but what I need is to change the coordinates to keep all the cursos in one file, if I use that method (change the cursor image file) I need to create 1 file for each cursor.


          ------
          EDIT: this "DrawHUD()" is like an update to the image? I need to call that if I change any information in the HUD like Crosshair coordinates?

          Comment

          Working...
          X