Search found 16 matches

by JC
Fri Aug 25, 2006 10:04 am
Forum: PSP Lua Player Development
Topic: NOOB Info
Replies: 5
Views: 2185

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 ...
by JC
Tue Aug 22, 2006 9:33 am
Forum: PSP Lua Player Development
Topic: NOOB Info
Replies: 5
Views: 2185

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...
by JC
Wed Aug 09, 2006 5:23 pm
Forum: PSP Lua Player Development
Topic: Dynamic Function Calls
Replies: 5
Views: 1858

Wonderful. Thanks for the help (and the quick replies).

JC
by JC
Wed Aug 09, 2006 4:45 pm
Forum: PSP Lua Player Development
Topic: Dynamic Function Calls
Replies: 5
Views: 1858

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&...
by JC
Sun Jul 23, 2006 2:37 pm
Forum: PSP Lua Player Development
Topic: artificial coding
Replies: 10
Views: 2780

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
by JC
Fri Jul 21, 2006 12:14 pm
Forum: PSP Lua Player Development
Topic: artificial coding
Replies: 10
Views: 2780

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...
by JC
Fri Jul 21, 2006 9:47 am
Forum: PSP Lua Player Development
Topic: artificial coding
Replies: 10
Views: 2780

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...
by JC
Mon Jun 26, 2006 11:16 am
Forum: PSP Lua Player Development
Topic: string.find - strange result
Replies: 2
Views: 1098

Thanks Drakonite,

Code: Select all

string.find("abcdef.",".",1,true) 


Does the trick.
Regards,
JC
by JC
Mon Jun 26, 2006 9:58 am
Forum: PSP Lua Player Development
Topic: string.find - strange result
Replies: 2
Views: 1098

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....
by JC
Fri Jun 23, 2006 3:31 pm
Forum: PSP Lua Player Development
Topic: LUA Version/ Platform Information
Replies: 5
Views: 1763

Thanks guys,

Both your suggestions will enable me to acheive what I want.
by JC
Mon Jun 19, 2006 10:39 am
Forum: PSP Lua Player Development
Topic: LUA Version/ Platform Information
Replies: 5
Views: 1763

_VERSION returns LUA 5.0.2 on both windows and PSP.

Another thought I had was maybe I could suppress the error message, is that possible ?
by JC
Thu Jun 15, 2006 11:06 am
Forum: PSP Lua Player Development
Topic: LUA Version/ Platform Information
Replies: 5
Views: 1763

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&#...
by JC
Sat Jun 03, 2006 10:23 am
Forum: PSP Lua Player Development
Topic: Flip and screen.waitVblankStart
Replies: 9
Views: 2398

Thanks,

I think I've got it now.

JC
by JC
Sat Jun 03, 2006 9:14 am
Forum: PSP Lua Player Development
Topic: Flip and screen.waitVblankStart
Replies: 9
Views: 2398

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...
by JC
Fri Jun 02, 2006 3:50 pm
Forum: PSP Lua Player Development
Topic: Flip and screen.waitVblankStart
Replies: 9
Views: 2398

Works the same with either screen.flip() or screen:flip()
by JC
Fri Jun 02, 2006 10:00 am
Forum: PSP Lua Player Development
Topic: Flip and screen.waitVblankStart
Replies: 9
Views: 2398

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...