zeroth404@Posted: Fri Oct 06, 2006 2:15 pm :
This code isn't working, I've commented where the variable should be multiplied by a number and "just work." Also, this isn't on a surface -- it's the HUD.

Code:
windowDef Desktop {
  rect  0 ,0 ,640 ,480
  visible  1'
  bordersize  1
  bordercolor  0, 1, 0, 1
  backcolor  0, .2, 0, 0.5

  windowDef zerothWindow {
    rect  240, 448, 150, 30
    bordersize  1
    bordercolor  1, 0, 0, 1
    visible  1
    float  "aValue" 5

    windowDef hecInvTiles {
      rect  0, 0, ( 30 * "zerothWindow::aValue" ), 30  // Doesn't Work! Why??
      visible 1
    }
  }
}



Kristus@Posted: Fri Oct 06, 2006 4:24 pm :
Replace it with 150, it'll be the same result.



zeroth404@Posted: Fri Oct 06, 2006 11:20 pm :
Kristus wrote:
Replace it with 150, it'll be the same result.


thats not the point. the variable should work, and I need it to be avariable (the value will change)



BloodRayne@Posted: Sat Oct 07, 2006 8:35 am :
zeroth404 wrote:
This code isn't working, I've commented where the variable should be multiplied by a number and "just work." Also, this isn't on a surface -- it's the HUD.

Code:
windowDef Desktop {
  rect  0 ,0 ,640 ,480
  visible  1'
  bordersize  1
  bordercolor  0, 1, 0, 1
  backcolor  0, .2, 0, 0.5

  windowDef zerothWindow {
    rect  240, 448, 150, 30
    bordersize  1
    bordercolor  1, 0, 0, 1
    visible  1
    float  "aValue" 5

    windowDef hecInvTiles {
      rect  0, 0, ( 30 * "zerothWindow::aValue" ), 30  // Doesn't Work! Why??
      visible 1
    }
  }
}


Ok, I think you don't need to put the 'zerothWindow::' in front of it. It should just be 'aValue' (it's a know variable you don't need to make an extra pointer for because it's inside the same windowDef.



zeroth404@Posted: Sat Oct 07, 2006 6:24 pm :
Well, now I'm just using variables from the compiled code instead of the GUI script. its much easier to deal with that way and works just the same.