Scripts / Loadimages 000,001,002 etc

Author
Message
thatandplaygames
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location: In a creative space
Posted: 24th May 2022 18:29
Here is my script:
function startdisplay2_init(e)
end

function startdisplay2_main(e)

if g_Entity[e]['plrinzone']==1 then

LoadImages("Crappy Crap",0)
SetImagePosition(50,50)
ShowImage(0)
FreezePlayer()
Prompt ("Press E to Continue" )

if g_KeyPressE == 1 then
UnFreezePlayer()
HideImage(0)
Destroy(e)
else
end
end
end

-------------------------------------
LoadImages("Crappy Crap",0) does load my 000.png but when I change it to:
LoadImages("Crappy Crap",1)
ShowImage(0) it does not load my 001.png

Any help would be appreciated.

THANKS!!
thatandplaygames
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location: In a creative space
Posted: 24th May 2022 18:42
I think I got this right... it's working.

LoadImages("Crappy Crap",0) --- Loads all of the images. I was changing "0" to the png array number... wrong thing to do.

ShowImage(0) can be ShowImage(1)...ShowImage(2)...etc to display each png.

Weeeeeeee!

Thanks!
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 24th May 2022 22:47 Edited at: 24th May 2022 22:49
IIRC LoadImages("Crappy Crap",0) loads the whole folder, so, if you have let's say (000.png, 001.png, 002. png) within the "Crappy Crap" folder, all those pics get loading, so, you can show whatever you want.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
thatandplaygames
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location: In a creative space
Posted: 25th May 2022 13:27
Thanks 3com. I figured that out by trial and error and research. Thanks!
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th May 2022 00:07
Glad to help
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-03-28 09:16:25
Your offset time is: 2024-03-28 09:16:25