Jump to content

Problem with Brush in the level.


Yue
 Share

Recommended Posts

I create a box brush on a map, and in a script I put the following code and I have an unexpected closing of Leadwerks.

 

function Script:Start()

		self.box = World:GetCurrent():FindEntity("Box")

end


function Script:Update()

		self.box:Hide()
end

Any suggestions?

 

The log file is blank, it has nothing in it.

It should be noted that this does not happen with an external mesh.

Mars.jpg.89ab63a64eebc1f5ada0ab82b66a1f8c.jpg

 

 

Link to comment
Share on other sites

  • 2 months later...

If I recall brushes get collapsed unless it has a script attached to it. I assume the script above is NOT on the brush in question so the brush got collapsed which results in not being able to get an instance of the brush (which must be causing LE to just close). Put an empty script on the brush called Box and try this again.

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...