Jump to content

[LE3] : access app.lua variables


YouGroove
 Share

Recommended Posts

I have the context in app.lua

self.window=Window:Create(self.title)
self.window:HideMouse()

--Create the graphics context
self.context=Context:Create(self.window,0)
if self.context==nil then return false end

 

I would want to access it from some other entity script :

Caus i don't know how to call the context from App.lua ?

Can i get the context from current entity character ?

 

 

 

This code don't work caus the context is not created in the entity script :

 


framePlayer = self.entity.animationmanager:getFrame()
local text = "Leadwerks"
self.context:SetBlendMode(Blend.Alpha)
self.context:DrawText(text,0,0)
self.context:SetBlendMode(Blend.Solid)


Stop toying and make games

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...