Change attribute type from integer to real?

sparkersparker Member Posts: 47
edited November -1 in Working with GS (Mac)
Hi all,

I have mistakenly created a heap of attributes as integers, used them in a heap of places throughout my game and now (during testing) realise that these in fact need to be attributes of the type real.

Is there any way I can change it? Going to take me a week to do it manually as if I create a new attribute with the same name and then delete the integer one, it isn't recognized in my game logic!!!!

Sam

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    sorry youll have to go threw and swap them all out with a new attribute for each. The names of the attributes are basically just labels for you to look at, in the xml file there each defined with there own id, so having a attribute with the same name will do nothing as they have different id's.

    cheers
  • sparkersparker Member Posts: 47
    Epic fail.... My mistake, but it's going to cost me!!!!
  • entersimonentersimon Member, PRO Posts: 273
    Since you're already going to have to go back and modify a ton of attributes, why not take a little bit of time and see if there is any way you can optimize for performance right now. Do you have any attributes that can be reused in ways you hadn't previously thought of?

    Gotta turn that negative into a positive! You'll get it done faster than you think you will. Good luck!
  • LumpAppsLumpApps Member Posts: 2,881
    There is a way to change from real to integer though I am not sure if this causes any trouble.
    So use a t own risk. (make a backup at least)
    When you right click your project choose see package contents.
    There you find all sorts of XML files and other files and folders. Open one of these files, depending on if it is an actor attribute or a game attribute in for example dream weaver.
    Then do a search on the name of your attribute(s).
    Left and right of the name you see something like <real> and <\real> you can change these to integer. When you save, close andclose the package folder, and then op the project you Willard the attributes have changed.
    I am on my iPhone now so some of the above info might be of.

    If someone knows if this is a stupid thing to do please let me know.
    I will not be offended.

    Cheers,
    Ludwig
Sign In or Register to comment.