So, I want the player to enter a collision trigger and that trigger makes it shows a picture, kind of like this script for text but instead of text, it shows a picture. How can I do this?
Script.ObjectDescription = "" --String "Object Description"
Script.DisplayTimeMax = 5000 --Int "Display time"
Script.Used = "0"
Script.DisplayTime = 0
Script.DisplayEnabled = false
local font1 = Font:Load("Fonts/True Lies.ttf", 20)
function Script:Use(context)
self.Used = "1"
self.CurrentTime = Time:GetCurrent()
self.DisplayTime = Time:GetCurrent() + self.DisplayTimeMax
end
function Script:PostRender(context)
if self.Used == "1" then
App.context:SetBlendMode(Blend.Alpha)
App.context:SetFont(font1)
self.DisplayEnabled = true
if self.DisplayEnabled == true then
if self.DisplayTime > Time:GetCurrent() then
App.context:SetColor(255,255,255)
context:DrawText(self.ObjectDescription, 100, 600)
else
self.DisplayEnabled = false
self.Used = "0"
end
end
App.context:SetBlendMode(Blend.Solid)
end
end