+bflentje Posted March 8, 2020 Share Posted March 8, 2020 Anyone know if it's possible to access media properties in code? I can't seem to get Description or alt-text to work while in code. Media (image) description always returns an empty or nil value, even though it has a value in the Earwigo media properties. The media object itself does pass through as the image is shown in the MessageBox function call. function HitObstacle(points, media) Wherigo.MessageBox({Text='You hit obstacle ' .. media.Description .. '. You LOSE ' .. math.abs(points) .. ' points.', Media = media}) end Quote Link to comment
+Tungstène Posted March 8, 2020 Share Posted March 8, 2020 If your tests showed it is not possible, try another way. I doubt the player will hit medias, anyway. You could try with a zone or (if you don't want to spoil the description if your zones are visible) an object. Quote Link to comment
+bflentje Posted March 10, 2020 Author Share Posted March 10, 2020 On 3/8/2020 at 2:49 PM, Tungstène said: If your tests showed it is not possible, try another way. AltText seemed to do the job. Odd that the Description property seems to me more important but not working. On 3/8/2020 at 2:49 PM, Tungstène said: I doubt the player will hit medias, anyway. You could try with a zone or (if you don't want to spoil the description if your zones are visible) an object. Not helpful. You have no idea what events lead up to my function. Quote Link to comment
+Tungstène Posted March 10, 2020 Share Posted March 10, 2020 14 hours ago, bflentje said: You have no idea what events lead up to my function. You are TOTALLY right. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.