Scripts / Displaying an image in a trigger zone once - logic error?

Author
Message
Ertlov
GameGuru BOTB Developer
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 3rd Jun 2016 11:59
The plan was to have an image (yes, it's named right and in the right folder placed and so on) displayed once when a player enters a zone.

My script looks like that and throws no LUA error:



Still, none of the images shows up.

Any ideas?
AMD FX 8Core @ 4GHZ - 16 GB DDR4 - 2xRadeon7950 - Windows 7 Ultimate
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Jun 2016 14:10
Since the script is looking for the image in the same folder as the script.
LoadImages("shock",0)

Does the image exist in the scriptbank folder under the images folder and is the folder called shock?

the "name" in the statement refers to the folder and the number indicates the image number.
000.png, 001.png,...

In the global .lua file the is this statement from Lee at the bottom:
LoadImage: myImage = LoadImage ( "myFolder\\myImage.png" ) -- Anywhere inside GG Files folder (however it is best to put into scriptbank images folder for making standalones)

Also is there an image 001.png for this statement?
ShowImage(1)

I am using the startdisplay scripts as a reference under the cartoon antics folder.

Hope this helps a bit more. If not then can you email me the image files and I will try and see if they work on my machine.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Ertlov
GameGuru BOTB Developer
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 3rd Jun 2016 14:35
Quote: "Since the script is looking for the image in the same folder as the script.
LoadImages("shock",0)

Does the image exist in the scriptbank folder under the images folder and is the folder called shock?
"


yes.

Quote: "Also is there an image 001.png for this statement?
ShowImage(1)"


yes.

I will try later again and then send over to you my setup

AMD FX 8Core @ 4GHZ - 16 GB DDR4 - 2xRadeon7950 - Windows 7 Ultimate
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jun 2016 14:50
You're using the wrong command for your needs, use LoadImage() instead of LoadImages()
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Ertlov
GameGuru BOTB Developer
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 3rd Jun 2016 21:34 Edited at: 3rd Jun 2016 21:49
Quote: "You're using the wrong command for your needs, use LoadImage() instead of LoadImages()"


doesnt change the result.
Besides, LoadImages works fine with my letters script where I have to read them by pressing "E"

Edit: Fixed it, the picture itself was the culprit.

however, it doesnt get destroyed and unshown afterwards.

AMD FX 8Core @ 4GHZ - 16 GB DDR4 - 2xRadeon7950 - Windows 7 Ultimate
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Jun 2016 22:05
ah, sorry yes my post was wrong, teach me for trying to read it on a phone
you are calling StartTimer(e) which will reset the GetTimer(e) result to 0 the entire time it is called so you need to set a toggle to only call StartTimer(e) once.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Ertlov
GameGuru BOTB Developer
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 3rd Jun 2016 22:15
works perfectly, and of course you are right, I was starting it all the time
AMD FX 8Core @ 4GHZ - 16 GB DDR4 - 2xRadeon7950 - Windows 7 Ultimate

Login to post a reply

Server time is: 2024-12-22 17:17:11
Your offset time is: 2024-12-22 17:17:11