Scripts / Image does not loading

Author
Message
MaximEpihin
User Deleted
Posted: 11th Dec 2015 16:42
Write a simple script to display images, the distance condition is triggered, but the picture is not loaded.
The picture is in the folder: \scriptbank\images\koala
name - 000.png
Why is it so?
Create a game - it's like to start a new universe where there is only you and solitude with the environment
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Dec 2015 17:33 Edited at: 11th Dec 2015 17:36
Try changing this line and see if the image loads.

LoadImage("koala", 0)

To

LoadImage("koala", 1)

The reason if it works is that arrays needs 000, 001, 002 to make the name in the array. But it is actually 1, 2, 3 for when you call it.

Coder can correct me if I am wrong. Thanks.
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

Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 11th Dec 2015 17:45 Edited at: 11th Dec 2015 20:21
I don't think it's that Myke, looking at the startdisplay script that has been used in most of the demo games to show an image on first load, it's all 0's.



You have an erroneous space and a missing s in there, change the line:



to

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Dec 2015 18:28
@myke you can use any number, it's just a reference to the starting position (or slot) you want to assign to the images...
i.e. LoadImages("folder",0) makes image 000.png show with ShowImage(0) but LoadImages("folder",10) would make image 000.png show with ShowImage(10)

@MaximEpihin i think the actual problem is that you have missed the 's' in the call LoadImages(str,v)
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
MaximEpihin
User Deleted
Posted: 11th Dec 2015 19:54
@smallg sure, thank you
Create a game - it's like to start a new universe where there is only you and solitude with the environment
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 11th Dec 2015 20:21
Quote: "
@MaximEpihin i think the actual problem is that you have missed the 's' in the call LoadImages(str,v)
"


That's what I said! :p
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 12th Dec 2015 05:50
mine was in its default condition as I had not played with it. Works fine on my side as it is. It showed as loadImages ("note",1)


Thanks for the explanation smallg
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

Login to post a reply

Server time is: 2024-12-22 10:23:02
Your offset time is: 2024-12-22 10:23:02