Lua Programming Help Thread
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; you can only send a string with IR so no it wouldn't work. Just check the example in LUA player ...
-
08-02-2006, 09:16 AM #3061
you can only send a string with IR so no it wouldn't work. Just check the example in LUA player itself.
LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
08-02-2006, 10:38 AM #3062QJ Gamer Green
- Registriert seit
- Oct 2005
- Ort
- Scotland, UK
- Beiträge
- 571
- Points
- 7.057
- Level
- 55
- Downloads
- 0
- Uploads
- 0
hey, i was wondering is there a way to exit out of a script without going back to the script which initiated that . Here is a diagram.
intro
¦
¦
Vwhat i want to know is how to do i exitstart menu <--------------out of this script without going to the intro?¦
¦
V
rest of game
-
08-02-2006, 10:41 AM #3063Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
I'm still in need of some information on the Danzeff Keyboard, any help on that would be great..
-
08-02-2006, 01:18 PM #3064QJ Gamer Green
- Registriert seit
- Oct 2005
- Ort
- Scotland, UK
- Beiträge
- 571
- Points
- 7.057
- Level
- 55
- Downloads
- 0
- Uploads
- 0
hey is there a solution to my problem?
edit: i just relaised that seem a bit rude, sorryGeändert von mark.sparky (08-02-2006 um 01:21 PM Uhr)
-
08-02-2006, 01:31 PM #3065words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Easy... make your intro a function, your menu a function and your main game a function... just call your menu function to exit or w/e u want.
Zitat von mark.sparky

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-02-2006, 05:02 PM #3066QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
I need to make a random number between 52-84 (I need a damage number when my carecter strikes) Also what is the lvl you start on FF7...... not.... that.....im.....hinting to what im making. ;)
Taking things too far one step at a time
-
08-02-2006, 05:18 PM #30676201ymereJ

- Registriert seit
- Jul 2005
- Ort
- Baltimore
- Beiträge
- 588
- Points
- 7.062
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Zitat von Ralan
at the beggining of your script throw in a
That makes it so your randomly generated number are even more random.Code:math.randomseed(os.time())
The where you want to pick the random number put
Which gives a random integer between the low, 52, and the high, 84.Code:math.random(52,84)
-
08-02-2006, 05:26 PM #3068QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
If i get the first boss done tonight Ill release a tech demo :) Ty for the help.
Zitat von Jeremy1026
Taking things too far one step at a time
-
08-02-2006, 05:29 PM #30696201ymereJ

- Registriert seit
- Jul 2005
- Ort
- Baltimore
- Beiträge
- 588
- Points
- 7.062
- Level
- 55
- Downloads
- 0
- Uploads
- 0
np, i use math.random about 100 times in yahtzee :)
Zitat von Ralan
-
08-02-2006, 05:30 PM #3070Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
cool. how would you go about printing that to screen i wanna play aroud with it
-
08-02-2006, 05:31 PM #3071sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
and then to add to that for damage say:
I don't understand why you want the attacking to be random....?Code:Randnum=math.random(52, 84) enemy = {} enemy.health = 100 if Randnum >=52 and <=70 and player.attack = true then --assuming you have a player.attack enemy.health = enemy.health - 5 end
-
08-02-2006, 05:31 PM #3072QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
Store it in a variable and print that
Zitat von N0obKi|l3r.exe
lol
Taking things too far one step at a time
-
08-02-2006, 05:34 PM #3073Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
wait im confused which one the os one or the actual setty up of the numbers one >.< uuuuugggggg
-
08-02-2006, 05:35 PM #3074sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
like so:
and that would display this: The random number is 7Code:math.randomseed(os.time()) Randnum = math.random(1, 100) screen:print("The random number is" .. Randnum)
Asuuming the random number actually is 7
Geändert von Bronx (08-02-2006 um 05:37 PM Uhr) Grund: Automerged Doublepost
-
08-02-2006, 05:35 PM #3075Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
ah okay. lmme make a demo for my game for pushing x lets say
-
08-02-2006, 05:35 PM #3076QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
Its alot easier and more efficent
Zitat von Bronx
Taking things too far one step at a time
-
08-02-2006, 05:37 PM #3077Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
exept it would take 20 shots to kill him T_T
-
08-02-2006, 05:38 PM #3078sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
@ralan, ahhhh

@noobkiller, I edited my post several times since my comp is lagging, so make sure u have the right code
-
08-02-2006, 05:41 PM #3079QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
Depending on your enimes healt, You think too small
Zitat von N0obKi|l3r.exe
Taking things too far one step at a time
-
08-02-2006, 05:46 PM #3080Asleep...

- Registriert seit
- Oct 2005
- Beiträge
- 1.383
- Points
- 11.516
- Level
- 70
- Downloads
- 0
- Uploads
- 0
with that code then it would ;) unless yo change it O,ODepending on your enimes healt, You think too small
ARRRRRGH i suck at puttong snippets of code together. all i get is wrong numbber of arguments
-
08-02-2006, 05:47 PM #3081Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
can someone PLS help me??
:Cry: :Cry: :Cry: :Cry: :Cry: :Cry: :Cry: :Cry: :Cry:
I CANT ******* FIGURE IT OUT!!!!!!! ARGH!!!!!!!!!!!! IM GOING TO BURST!!!!!!!!!!!!!!!!!!!! !
:Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh:--------------------------------------------------------------------------------------
-
08-02-2006, 05:58 PM #3082QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
Whats your problem? (Final question, HOW DO I FIGURE OUT WHERE MY IMAGES SHOULD GO THEN THAT THE COOREDTNETS and use them in my script (srry about cap locks))
Zitat von Grimfate126
Taking things too far one step at a time
-
08-02-2006, 05:59 PM #3083I think I ripped my pants
- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 6.484
- Points
- 33.140
- Level
- 100
- Downloads
- 0
- Uploads
- 0
lol, if you tell us what your problem is maybe ;)
Zitat von Grimfate126
[CENTER][IMG]http://i33.tinypic.com/wmeb8x.jpg[/IMG][/CENTER]
[FIELDSET="Useful Links"][CENTER][SIZE="1"][B][URL="http://forums.qj.net/showthread.php?p=13162#post13162"][COLOR="Red"][Posting Guidelines][/COLOR][/URL] - [URL="http://forums.qj.net/f-qjnet-news-and-help-25/t-qj-quick-justice-policy-must-read-69509.html"][COLOR="Red"][Quick Justice Policy][/COLOR][/URL] - [URL="http://forums.qj.net/showthread.php?t=9708"][COLOR="Red"][PSPositive Posting][/COLOR][/URL] - [URL="http://forums.qj.net/showthread.php?t=4394"][COLOR="Red"][Piracy Policy][/COLOR][/URL]
[URL="http://forums.qj.net/showthread.php?t=65979"][COLOR="SeaGreen"][Ultimate QJ Guide][/COLOR][/URL] - [URL="http://forums.qj.net/f-qjnet-news-and-help-25/t-faq-useful-info-and-links-for-new-members-53693.html"][COLOR="SeaGreen"][Newbie FAQ/Guide][/COLOR][/URL] - [URL="http://forums.qj.net/showthread.php?t=19128"][COLOR="SeaGreen"][Become Premium][/COLOR][/URL] - [URL="http://forums.qj.net/f-wii-general-108/t-wii-faq-20295.html"][COLOR="SeaGreen"][Wii FAQ][/COLOR][/URL][/B][/SIZE][/CENTER][/FIELDSET]
-
08-02-2006, 06:19 PM #3084QJ Gamer Green
- Registriert seit
- Feb 2006
- Ort
- This Forum
- Beiträge
- 1.825
- Points
- 15.884
- Level
- 81
- Downloads
- 0
- Uploads
- 0
Is there a program that will allow me to place a image and see the coordiates so i can use them in m image placing?
Taking things too far one step at a time
-
08-02-2006, 06:25 PM #3085sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
yes, but i dont remember the name of it. I think it may of been by kozine, but thats kinda a guess.
-
08-02-2006, 06:30 PM #3086QJ Gamer Bronze
- Registriert seit
- Oct 2005
- Ort
- Alabama
- Beiträge
- 272
- Points
- 5.975
- Level
- 50
- Downloads
- 0
- Uploads
- 0
I actually could use something for that myself. I may code up a program that will do that, which will run on the pc rather than psp.
Zitat von Ralan
My lua tutorials for PSP - www.evilmana.com/tutorials
PSP Lua CodeBase - Add your own code examples to the codebase! - www.evilmana.com/tutorials/codebase/
-
08-02-2006, 06:32 PM #3087Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von Grimfate126
THATS my problem. im SOOOO CLOSE to finishing my app, WHEN THIS ******* PROBLEM COMES UP.
ANY help is appreciated lik a LOT!!--------------------------------------------------------------------------------------
-
08-02-2006, 07:14 PM #3088Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Just don't try to tell him to take the "name" input out of the function, 'cause we already tried that and he didn't like it. :)
Code:function make(header, frames) local name={} for a = 1, frames do name[a] = Image.load(header..a..".png") end return name end -- then call it like this test_array={} char_array={} misc_array={} make(test, 9) make(char, 6) make(misc, 5)
-
08-03-2006, 02:10 AM #3089
Thats like the easiest thing to code. Only thing you need is an example image/real one or a cursor, code for movement and you print the coordinates of it. Yes there was one, I think it was Gutya's.
Zitat von Ralan
LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
08-03-2006, 02:23 AM #3090QJ Gamer Green
- Registriert seit
- Oct 2005
- Ort
- Scotland, UK
- Beiträge
- 571
- Points
- 7.057
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Final question before i realese my first game: Is there a way make a function only run once?


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum