UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!

Results 1 to 7 of 7

Thread: I dont understand what % means in code

  1. #1
    Join Date
    Oct 2015
    Location
    Posts
    74
    Uploads
    13
    Comments
    72

    Default I dont understand what % means in code

    i have seen it used with time and sometime random and i always get confused by it so can somebody help clear it for me ?



  2. #2

    Default Re: I dont understand what % means in code

    It's in the mugen document
    called Modulus Operator

    for example
    6 / 3 = 2 remainder is 0
    so
    6%3 = 0

  3. #3
    Join Date
    Oct 2015
    Location
    Posts
    74
    Uploads
    13
    Comments
    72

    Default Re: I dont understand what % means in code

    so when it's used for example random%5 it will divide random by 5 then give us the remainder?

  4. #4
    Join Date
    Jun 2015
    Location
    Posts
    2,536
    Uploads
    1595
    Comments
    4514

    Default Re: I dont understand what % means in code

    Quote Originally Posted by Koshty View Post
    so when it's used for example random%5 it will divide random by 5 then give us the remainder?
    Yes.

  5. #5

    Default Re: I dont understand what % means in code

    If you're really interested in coding, you should definitely read the documentation located in your MUGEN folder. Superficial understanding of some lines here and there can only lead to bad edits and broken code. random%n can be used to set the probability of some events, it could be useful in AI development among other things.

  6. #6
    Join Date
    Oct 2015
    Location
    Posts
    74
    Uploads
    13
    Comments
    72

    Default Re: I dont understand what % means in code

    Quote Originally Posted by Anji Mito View Post
    If you're really interested in coding, you should definitely read the documentation located in your MUGEN folder. Superficial understanding of some lines here and there can only lead to bad edits and broken code. random%n can be used to set the probability of some events, it could be useful in AI development among other things.
    I did read most of it but i probably forgot about this part

  7. #7

    Default Re: I dont understand what % means in code

    Quote Originally Posted by Koshty View Post
    I did read most of it but i probably forgot about this part
    From the docs main folder, go to CNS format, then expressions.
    https://mugenarchive.com/docs/1.1/cns.html#expressions

    And you can find more details on the wiki.
    https://mugenarchive.com/wiki/MUGEN:Expressions

Similar Threads

  1. Just want to understand a problem.
    By Josen in forum Shitposting
    Replies: 3
    Last Post: Jun 18, 2018, 20:55
  2. What means
    By fljyin08020511 in forum MUGEN Configuration Help
    Replies: 0
    Last Post: Nov 19, 2016, 05:30
  3. What do these green ball thing means
    By Hyperwolfies in forum Website Feedback and Support
    Replies: 1
    Last Post: Aug 07, 2016, 14:20
  4. I dont understand nothing
    By Evelyn in forum MUGEN Configuration Help
    Replies: 3
    Last Post: Dec 05, 2015, 02:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •