Jump to content

lxFirebal69xl

Members
  • Posts

    333
  • Joined

  • Last visited

Posts posted by lxFirebal69xl

  1. This does a picture instead:

     

    Script.ObjectDescription = "test" --String "Object Description"
    Script.DisplayTimeMax = 5000 --Int "Display time"
    Script.Used = "0"
    Script.DisplayTime = 0
    Script.DisplayEnabled = false
    Script.image=Texture:Load("Materials/Effects/bloodspatter.tex")
    function Script:Use(context)
    self.Used = "1"
    self.DisplayTime = Time:GetCurrent() + self.DisplayTimeMax
    self.DisplayEnabled=true
    end
    
    function Script:PostRender(context)
    if self.Used == "1" then
    context:SetBlendMode(Blend.Alpha)
    self.DisplayEnabled = true
    if self.DisplayEnabled == true then
    if self.DisplayTime > Time:GetCurrent() then
    context:DrawImage(self.image, 100, 100,100,100)
    else
    self.DisplayEnabled = false
    self.Used = "0"
    end
    end
    App.context:SetBlendMode(Blend.Solid)
    end
    end
    

     

    Collision trigger: Are you talking about if the player enters a certain zone this script gets played? Or is it if the player selects an object like with this script?

     

    I was talking about the player entering the zone and the picture would show up. Looks like this one only works for when a player uses an objectand it only shows up with a black box on the corner, no actual picture shows up :(

  2. 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? tongue.png

     

    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

  3. how to convert them to .tex files.

     

    I'm well aware that google exists, and I've been searching through forums for a solution on how to convert the .mdl files to .tex files.

    When I import the model into blender it has the textures but when I export the model in an .fbx file it doesn't have textures<---I want the fix for this.

     

    Sorry if I came off as uninformative.

  4. Exactly what the title says, how can I have assets in game that the player is able to use and text shows up? Kind of like how in some horror games the player clicks an object and the main character talks about it and text shows up. I'm a LUA noob, so I apolozige in advance if this is a dumb question.

    Thanks for reading

     

    -Fire

×
×
  • Create New...