assigning propeties to a global variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bagstoper
    New Member
    • Feb 2007
    • 40

    assigning propeties to a global variable

    is it possible to asign properties to a global variable. if so can someone tell me how?
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by bagstoper
    is it possible to asign properties to a global variable. if so can someone tell me how?
    I think you will need to clarify what you mean.

    For a start, what version of VB are you using?

    And do mean mean that you want to take a property of some object, and store it in a global variable? If so, it's a simple matter of declaring a global variable of the same type as the property (or a variant, which can hold pretty much anything but has some tradeoffs). Then assign the property value to it, the same way you would any other value.

    Comment

    • bagstoper
      New Member
      • Feb 2007
      • 40

      #3
      i am making a video game and i want to assign attributes to specific items in the game. (example: strength band- raises strength + 5) i want it so that when the player equipes this item his strength will go up. i also want to assign other benifits to items like faster attack speed or slower attack speed and other things like that.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by bagstoper
        i am making a video game and i want to assign attributes to specific items in the game. (example: strength band- raises strength + 5) i want it so that when the player equipes this item his strength will go up. i also want to assign other benifits to items like faster attack speed or slower attack speed and other things like that.
        Ok, so you just create a code module and define there your various "properties " as Public variables.

        Comment

        Working...