Scripts / 100.png and further problem.

Author
Message
Olfa
7
Years of Service
User Offline
Joined: 12th Feb 2017
Location:
Posted: 8th Apr 2017 15:34
I've found the thread https://forum.game-guru.com/thread/210424 from 2015, but there isn't a decision

I need at least 200 images for my game, and I thought GameGuru can show 999 (cause of its number system). Does anybody know the decision?
Help please. Thanks in advance!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Apr 2017 16:11 Edited at: 8th Apr 2017 16:14
use sprites instead and load the images individually with LoadImage and CreateSprite.
the LoadImages command is old and should really be removed.

to do this quickly using the old version it will look something like this
img = {}
for a = 1, 200 do
img[a] = CreateSprite(LoadImage("scriptbank\\images\\"..a..".png"))
end

then you can reposition, size etc each with
SetSpritePosition(img[1],50,50) --move sprite 1 to center of screen
etc
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Olfa
7
Years of Service
User Offline
Joined: 12th Feb 2017
Location:
Posted: 8th Apr 2017 17:05 Edited at: 8th Apr 2017 17:12
Thank you! But where should I put these parts? Main, init part or smwhr?
Now all I have is "Runtime error 501 Image number 96000"
And should I do anything with global.lua? Now if I remove --[[]]-- at the end of file I get "You're calling GetPlayerDistance but this thing is nil".

Could you please show me how must this script be written with sprites?



I rewrite it, but this is fail -

PM
Olfa
7
Years of Service
User Offline
Joined: 12th Feb 2017
Location:
Posted: 8th Apr 2017 22:28 Edited at: 8th Apr 2017 22:40
I'm trying to do my best and I'm seeking the Path by myself
I've found the half-decision:



It seems all is good but the second DeleteSprite ( mySprite ) doesn't work. Why?
I even tried to replace the pic with other transparent pic, but it doesn't work, too.
And SetSpriteSize (mySprite, 0, 0) doesn't help, too
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Apr 2017 07:39 Edited at: 9th Apr 2017 07:41
Try this

Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-23 04:53:32
Your offset time is: 2024-12-23 04:53:32