| View previous topic :: View next topic |
| Author |
Message |
Squall333
Joined: 28 Apr 2005 Posts: 91
|
Posted: Sat Aug 20, 2005 9:26 am Post subject: Wait command |
|
|
| is there a wait command i tried wait(5) and it didnt work |
|
| Back to top |
|
 |
Benihana
Joined: 31 Jul 2005 Posts: 12
|
Posted: Sat Aug 20, 2005 9:47 am Post subject: |
|
|
How about: waitVblankStart(i)
where i = 1/60 second |
|
| Back to top |
|
 |
Squall333
Joined: 28 Apr 2005 Posts: 91
|
Posted: Sat Aug 20, 2005 10:02 am Post subject: |
|
|
i dont think that works it says attempt to call to global 'waitvblankstart' (a nil value'
if theres no wait value thats cool i just need a way so that when i say
if pad:cross() then
p=p+1
end
p doesnt equal like 40 by pressing x once |
|
| Back to top |
|
 |
Benihana
Joined: 31 Jul 2005 Posts: 12
|
Posted: Sat Aug 20, 2005 12:59 pm Post subject: |
|
|
Oops it's screen.waitVblankStart()
Also, Lua is CASE sensitive, therefore you must write that function exactly as you see it here, with a lowercase wait, an upper case V, lowercase blank, and uppercase Start. Otherwise Lua will think you are trying to call some function waitvblankstart, which you have not defined.
http://www.lua.org/pil/ |
|
| Back to top |
|
 |
Squall333
Joined: 28 Apr 2005 Posts: 91
|
Posted: Sun Aug 21, 2005 1:16 pm Post subject: |
|
|
Is there an equivalent of mod (%) in lua
like 4 % 2 = 0 |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Sun Aug 21, 2005 1:30 pm Post subject: |
|
|
| Squall333 wrote: | Is there an equivalent of mod (%) in lua
like 4 % 2 = 0 |
there is math.mod(a,b) _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
|