|
#21
|
||||
|
||||
|
Quote:
The first four are screen coordinates and the last two are sizes: First two are where the upper left corner of the pic would be on screen, next two are where you want to start drawing the snip, and last two are the sizes of the snip. I used my incredible paint skills to visualize this: exampleImage:draw(x1, y1, x2, y2, x3, y3)
__________________
this is a link to my personal homepage which I haven't |
| Advertisement | [Remove Advertisement] |
|
|
|
|
#22
|
|||
|
|||
|
i already wrote about this in another tread.
http://www.anythingbutipod.com/forum...3&postcount=17 |
|
#23
|
||||
|
||||
|
Q: How do I get the opposite (negative) of a positive number? I've already tried using the NOT (~) operator, and also multiplying by -1:
Code:
print(10); print(~10); print(-1 * 10); |
|
#24
|
||||
|
||||
|
It shouldn't crash when you multiply.
try print(tostring(-1*10))
__________________
There was a little man... |
|
#25
|
||||
|
||||
|
Q: Is there a switch statement for Lua? I googled it but wasn't convinced.
|
|
#26
|
||||
|
||||
|
I googled the same thing some time ago, and the answer is no: there is no switch in Lua.
You'll have to use if/else...
__________________
There was a little man... |
|
#27
|
||||
|
||||
|
Alright, here's another question: If you load and image as such:
Code:
test = image.load("test.jpg");
Code:
myTable = {};
myTable.img = test;
Thanks in advance! |
|
#28
|
||||
|
||||
|
I would think it is copied, so just load it directly:
myTable.img = image.load("test.jpg");
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#29
|
||||
|
||||
|
So for the game I'm currently working on there's a variable that holds the amount of money the player has. At first it'll start out at around 500, but by the end of the game it may be in the millions. I assume I can just use an int for this (4,328,291), or should I avoid possible "max-size exceeded" issues by instead dividing the actual amount by a number and using a double (4,328.291) and converting to the actual number every time I needed to use it?
|
|
#30
|
||||
|
||||
|
I would just use an int. In pingus, we have some rather large variables as well, though I suppose in the end, it is a personal preference.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:53 PM.












Linear Mode
