1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Custom Damage/Resist system

Discussion in 'Triggers & Scripts' started by Spartipilo, Sep 20, 2012.

  1. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    These numbers are reals turned to integers, so, the math is done with reals, but displayed as integers, that's why there's 1+ or 1- in the text math.

    To remove the message read through the Spart DS Damage trigger and remove the lines that display the message, there are 2 commented functions to do that.

    The multiboard is optional; the events i'm using to display it is Select/Deselect a unit. You can create a Boolean Array, and set it to "true" for the player that has the "Damage" table being selected as "The table to display" (I guess you switch between tables with Escape), and add the condition to that trigger (Spart DS Multiboard Update) for the boolean to be true in order to update. You would also have to store the multiboard in your Player_Multiboard array. (Set YourPlayerBoardVariable = SpartDSBoard)
     
  2. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    add 0.5 to the real before converting to integer to make the correct conversion... :)
     
  3. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    That's just to display damage screen text in the test map, that's why I left it as it's :p
     
  4. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    well, seeing 8+32 = 41 is not a good sight... :)
     
  5. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Will still be 41 if you add 0.5.
     
  6. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    there is something wrong with the 8 or the 32, not on the 41... XD

    it should either be 9 + 32 or 8 + 33...
     
  7. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Well I think you cannot convert it at the end but converting them one by one thus get a more fair result. But I guess that's what ya mean :p