Search found 16 matches
- Fri Aug 25, 2006 10:04 am
- Forum: PSP Lua Player Development
- Topic: NOOB Info
- Replies: 5
- Views: 4338
Where have you installed luaplayer ? You will probably need to give an explicit path to the luaplayer.exe. The why I tend to do things is install something along the following: 1) install luaplayer in c:\luaplayer 2) Make a new directory for the game/app i am working on like c:\luaplayer\test 3) So ...
- Tue Aug 22, 2006 9:33 am
- Forum: PSP Lua Player Development
- Topic: NOOB Info
- Replies: 5
- Views: 4338
First off check out http://www.luaplayer.org/ There you can download both windows and PSP versions of Lua Player. You can use any text editor to edit your code. You can test your programs on your PC using the windows version of LUAPlayer and then transfer the code to your PSP. The file extension for...
- Wed Aug 09, 2006 5:23 pm
- Forum: PSP Lua Player Development
- Topic: Dynamic Function Calls
- Replies: 5
- Views: 4783
- Wed Aug 09, 2006 4:45 pm
- Forum: PSP Lua Player Development
- Topic: Dynamic Function Calls
- Replies: 5
- Views: 4783
Dynamic Function Calls
Hi Folks, I not sure if what I am trying to do is possible, hopefully someone will be able to shed some light. I want to pass a function name to a second function and get the second function to call the first one. eg: Main(SubMain,"blah") function Main(pName,pstuff&...
- Sun Jul 23, 2006 2:37 pm
- Forum: PSP Lua Player Development
- Topic: artificial coding
- Replies: 10
- Views: 6113
Yep, that's correct.
Check out these links, they are pretty usefully
http://www.lua.org/pil/
http://www.lua.org/manual/5.0/manual.html
Check out these links, they are pretty usefully
http://www.lua.org/pil/
http://www.lua.org/manual/5.0/manual.html
- Fri Jul 21, 2006 12:14 pm
- Forum: PSP Lua Player Development
- Topic: artificial coding
- Replies: 10
- Views: 6113
It's pretty easy once you break down what you want to do: 1) See if you enemy is lined up with your character (check the X or Y setting were appropriate) 2) If he is lined up use a random number to decide whether or not to shoot (if math.random(1,3) = 1 then ......... end) As far as movement is conc...
- Fri Jul 21, 2006 9:47 am
- Forum: PSP Lua Player Development
- Topic: artificial coding
- Replies: 10
- Views: 6113
You need the math.randomseed(os.time()) to ensure you random numbers really are random. If you don't seed the random number generator (or if you seed it with a known value) then the number sequences will be the same each time. By using os.time to seed it you use a different number each time the prog...
- Mon Jun 26, 2006 11:16 am
- Forum: PSP Lua Player Development
- Topic: string.find - strange result
- Replies: 2
- Views: 2454
Thanks Drakonite,
Does the trick.
Regards,
JC
Code: Select all
string.find("abcdef.",".",1,true)
Does the trick.
Regards,
JC
- Mon Jun 26, 2006 9:58 am
- Forum: PSP Lua Player Development
- Topic: string.find - strange result
- Replies: 2
- Views: 2454
string.find - strange result
I am getting a 'strange' result using string.find to find a '.' (full stop) in a string. The function always returns 1 regardless of where the full stop is. The code below illustrates the issue. It prints two numbers the top one should be the position of the full stop within the string "abcdef....
- Fri Jun 23, 2006 3:31 pm
- Forum: PSP Lua Player Development
- Topic: LUA Version/ Platform Information
- Replies: 5
- Views: 3681
- Mon Jun 19, 2006 10:39 am
- Forum: PSP Lua Player Development
- Topic: LUA Version/ Platform Information
- Replies: 5
- Views: 3681
- Thu Jun 15, 2006 11:06 am
- Forum: PSP Lua Player Development
- Topic: LUA Version/ Platform Information
- Replies: 5
- Views: 3681
LUA Version/ Platform Information
Hi Folks, I am coding using windows Lua Player. I want to display battery/memory information. The following works on my PSP but not on windows: screen:print (10,10,"battery: " .. System.powerGetBatteryLifePercent(),Color.new(255,255,255&#...
- Sat Jun 03, 2006 10:23 am
- Forum: PSP Lua Player Development
- Topic: Flip and screen.waitVblankStart
- Replies: 9
- Views: 7721
- Sat Jun 03, 2006 9:14 am
- Forum: PSP Lua Player Development
- Topic: Flip and screen.waitVblankStart
- Replies: 9
- Views: 7721
Thanks for the replies, I am still cutting my first teeth with Lua and from reading some of the documentation it suggested that the waitVblankStart() should come before the flip (I see a lot of programs that use it this way). But from what you guys are saying it should always come after the flip, it...
- Fri Jun 02, 2006 3:50 pm
- Forum: PSP Lua Player Development
- Topic: Flip and screen.waitVblankStart
- Replies: 9
- Views: 7721
- Fri Jun 02, 2006 10:00 am
- Forum: PSP Lua Player Development
- Topic: Flip and screen.waitVblankStart
- Replies: 9
- Views: 7721
Flip and screen.waitVblankStart
Hi Folks, I have a question regarding how to use screen:flip() and screen.waitVblankStart(). From what I have read you should issue the screen.waitVblankStart() before you do a screen:flip() , to wait for the start of the vblank etc. So based on that the following should work: screen:print&a...