Jump to content

Earwigo and media properties


bflentje

Recommended Posts

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
 

Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...