Page 1 of 1

Question, random number, stand alone text editor

Posted: Wed Apr 18, 2007 3:16 am
by Nichkoi
Ok, two questions.

The first should be simple. I need the game to generate a random number within the limit of 1 - 150... I used to know how to do this, but i haven't touched programming in 4 or 5 year :oops:

Second, is there a way to install just the Ren'py text editor? I have a laptop with very limited space, and I just want to write the code keeping the same format as my code already done on my desktop, and save it when i'm done. I dont need to run the script or anything else. I know I can use notepad, but again I would like to keep the same formatting.

Re: Question, random number, stand alone text editor

Posted: Wed Apr 18, 2007 6:01 am
by denzil
Nichkoi wrote:Ok, two questions.

The first should be simple. I need the game to generate a random number within the limit of 1 - 150... I used to know how to do this, but i haven't touched programming in 4 or 5 year :oops:
Here:

Code: Select all

$ number = renpy.random.randint(1, 150)
You can search for "random" on http://renpy.org/ for more information.
Nichkoi wrote:Second, is there a way to install just the Ren'py text editor? I have a laptop with very limited space, and I just want to write the code keeping the same format as my code already done on my desktop, and save it when i'm done. I dont need to run the script or anything else. I know I can use notepad, but again I would like to keep the same formatting.
Yes, there is. In renpy-version\editor\ directory there is scite.exe - this is the editor. Simply copy it wherever you want it. You may also need to copy SciTEGlobal.properties file (from the same place).

Posted: Wed Apr 18, 2007 6:50 am
by Nichkoi
Thanks for the quick answers!