The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the newest Gaming News from
QJ.NET in your email each day?




Want to learn more about the team who brings you the QJ news?

Read about them now!

 


Results 1 to 8 of 8

random command in lua?

This is a discussion on random command in lua? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; what is the command for randomizing in lua? like is it: random(272)(kinda like flash?) thanks in advance=-)...

  
  1. #1
    QJ Gamer Gold
    Points: 17,453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    everywhere
    Posts
    3,526
    QJ Pts
    17,453
    Level
    84
    Downloads
    1
    Uploads
    0

    Default random command in lua?

    what is the command for randomizing in lua?

    like is it:

    random(272)(kinda like flash?)

    thanks in advance=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  2. #2
    QJ Gamer Silver
    Points: 10,995, Level: 69
    Level completed: 37%, Points required for next Level: 255
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    10,995
    Level
    69
    Downloads
    0
    Uploads
    0

    Default

    math.random(min,max)
    this generates a random number between min and max.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  3. #3
    QJ Gamer Gold
    Points: 17,453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    everywhere
    Posts
    3,526
    QJ Pts
    17,453
    Level
    84
    Downloads
    1
    Uploads
    0

    Default

    hmm i put max and it seems to do what i want but maybe thats cause i do not set a minimal and it assumes it as 0 anyways thanks=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  4. #4
    SHOOP DA WHOOP
    Points: 3,347, Level: 35
    Level completed: 98%, Points required for next Level: 3
    Overall activity: 23.0%

    Join Date
    Aug 2005
    Location
    Wii forums
    Posts
    7,405
    QJ Pts
    3,347
    Level
    35
    Downloads
    0
    Uploads
    0

    Default

    i dont know if it sets it to 0 automatically...

  5. #5
    QJ Gamer Gold
    Points: 17,453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    everywhere
    Posts
    3,526
    QJ Pts
    17,453
    Level
    84
    Downloads
    1
    Uploads
    0

    Default

    hmm that's what it does for me but now that i got that i'm trying to set a veriable so when true then blit it but then i can't move it or error in script arg i'll never get this done dam i hate 2.5=-(
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  6. #6
    QJ Gamer Gold
    Points: 17,453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    everywhere
    Posts
    3,526
    QJ Pts
    17,453
    Level
    84
    Downloads
    1
    Uploads
    0

    Default

    k got it yea=-)

    edit: sorry for double post=-(
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  7. #7
    QJ Gamer Green
    Points: 10,012, Level: 66
    Level completed: 91%, Points required for next Level: 38
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    IN hOMbReWvIlLe
    Posts
    1,133
    QJ Pts
    10,012
    Level
    66
    Downloads
    0
    Uploads
    0

    Default

    read the new tuts they have got almost everything covered
    [COLOR=LightBlue]there is a key to[COLOR=LightBlue] everylock[/COLOR][/COLOR]
    [url]http://totalgamerzone.com/[/url]
    [IMG]http://i8.photobucket.com/albums/a26/ChopperX/UserBars/mac.jpg[/IMG]

  8. #8
    Developer
    Points: 4,328, Level: 41
    Level completed: 89%, Points required for next Level: 22
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    9
    QJ Pts
    4,328
    Level
    41
    Downloads
    0
    Uploads
    0

    Default

    could try this

    math.floor(math.random()* max+1)+min


 

Tags for this Thread

Posting Permissions

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





All times are GMT -8. The time now is 03:06 PM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2013, Caputo Media, LLC. All Rights Reserved. Cluster C2.
Contact Us | Free Flash Games | Ad Blockers Suck! Why?