Help
Moderators: Shine, Insert_witty_name
you should try and make it happen your self. that is the best way to learn. look at other lua codes that use this missle firing or any other projectiles and learn off of that.
00100000 01101001 01101101 00100000 01110010 01101001 01100111 01101000 01110100 00100000 01100010 01100101 01101000 01101001 01101110 01100100 00100000 01111001 01101111 01110101 00100001
How about the idea...
You first write a code the best you can. Show it here on this thread. We can take a look at it what is missing or wrong. We'll try to suggest some corrections. This way we all can help you while you are learning, Ok?
PS Don't mind your English. Most of us aren't that good in English, anyway.
You first write a code the best you can. Show it here on this thread. We can take a look at it what is missing or wrong. We'll try to suggest some corrections. This way we all can help you while you are learning, Ok?
PS Don't mind your English. Most of us aren't that good in English, anyway.
Geo Massar
Retired Engineer
Retired Engineer
Yeah I noticed that too. But that is a good idea.KawaGeo wrote:How about the idea...
PS Don't mind your English. Most of us aren't that good in English, anyway.
00100000 01101001 01101101 00100000 01110010 01101001 01100111 01101000 01110100 00100000 01100010 01100101 01101000 01101001 01101110 01100100 00100000 01111001 01101111 01110101 00100001
The Controller has two types of actions triggered. Button Down. and Button up.
Button down is triggered each time the loop goes through and checks for commans. So as long as you have button down. Each time it loops it will trigger a ButtonDown event placed in your code. To fix this. Refer to this forum http://forums.ps2dev.org/viewtopic.php?t=4458
Or create yourself a button inhibitor. Please note that if you do choose to use the code posted on the forum that you must adhere to my request. (That mention my name somewhere in the source code.)
Button down is triggered each time the loop goes through and checks for commans. So as long as you have button down. Each time it loops it will trigger a ButtonDown event placed in your code. To fix this. Refer to this forum http://forums.ps2dev.org/viewtopic.php?t=4458
Or create yourself a button inhibitor. Please note that if you do choose to use the code posted on the forum that you must adhere to my request. (That mention my name somewhere in the source code.)
this is one om my codes
x=0
y=0
z=1
xm=1
ym=1
function missile(xm,ym,z) if z==1 then screen:blit(xm,ym+ypointchar,missile) end end
function char(x,y,z) if z==1 thne screen:blit(x,y,z,char) end end
while true do
pad = controles.read()
char(x,y,z)
ypointchar=y
if pad:r() then missile(xm,ym,z) xm=xm+5 end
end
The function.
if pad:r() then
missile(xm,ym,z)
xm=xm+5
end
Will be called every time it loops through IE Multiple button presses.
Please refer to what I posted earlier.
pad:r() is called every time the button is down during the check. So multiple events of it will be called each time that value returns true..
So in a loop pad:r() is triggered each time the loop you created. A loop is approx 0.005 MS depending on you code it varies from .0005 to .5ms. Which means you must make an inhibitor (ie a stop variable) so that value event isnt triggered every time it loops through.
Thinking logically helps alot while LUA Programming.
if pad:r() then
missile(xm,ym,z)
xm=xm+5
end
Will be called every time it loops through IE Multiple button presses.
Please refer to what I posted earlier.
pad:r() is called every time the button is down during the check. So multiple events of it will be called each time that value returns true..
So in a loop pad:r() is triggered each time the loop you created. A loop is approx 0.005 MS depending on you code it varies from .0005 to .5ms. Which means you must make an inhibitor (ie a stop variable) so that value event isnt triggered every time it loops through.
Thinking logically helps alot while LUA Programming.
-
- Posts: 11
- Joined: Thu Dec 29, 2005 12:32 am
sometimes it works but sometimes it doesnt. mine is about 50, 50 chance of it going off the character or item so i get a bunch of black boxes looping with multiple animations in them.LordCthulu wrote:Sorry if this is off-topic, but is there an easy way to get multiple animations to loop at the same time?
Like lets say I want grass "swaying" in the wind, and also want my character on screen to move.
00100000 01101001 01101101 00100000 01110010 01101001 01100111 01101000 01110100 00100000 01100010 01100101 01101000 01101001 01101110 01100100 00100000 01111001 01101111 01110101 00100001
3-5 images of grass placed differenly... loop though and poof done... all of the images should be timed and set down.LordCthulu wrote:Sorry if this is off-topic, but is there an easy way to get multiple animations to loop at the same time?
Like lets say I want grass "swaying" in the wind, and also want my character on screen to move.
Ok, Mr. Noob
Two errors are found:
1) All letters in Lua are case sensitive. That means, u = 0 and U = 0 are different.
2) Every if statement must end with "end" word.
Make those corrections and try.
Keep up going and you'd be fine.
PS: Use [ code] and [/code] for all codes.
PSS: You, other guys, don't crack a smile.
Two errors are found:
1) All letters in Lua are case sensitive. That means, u = 0 and U = 0 are different.
2) Every if statement must end with "end" word.
Make those corrections and try.
Keep up going and you'd be fine.
PS: Use [ code] and [/code] for all codes.
PSS: You, other guys, don't crack a smile.
Geo Massar
Retired Engineer
Retired Engineer
No, I didn't put that benchmark test in there, mostly becasue it was just blitting images.. I think the source just said to blit images at random locations, not sure exactly how it works, looks like a table is used.mrn wrote:regarding multiple animations..
if i am not wrong, there is a routine called bench in the "Tools" directory of the LuaOS, which throws bubbles into the air. 50-60 bubbles at the same time.
another source of the same thing could be the page of the twin-tail guy, ema.
Anyway, all I put was HSV and TwinTail.
And to n00b, are you monster365?