Jump to content

Trigger zone material like Source


thehankinator
 Share

Recommended Posts

How can I make a material that is visible in the editor but not when the game is running? For use specifically for invisible triggers. I could change the material via a script but it would be nice if I could create a special material that did all that for me.

 

I'm thinking of something similar to how it looks in Source engine

 

009-csgo-11.jpg

  • Upvote 1
Link to comment
Share on other sites

Draw a csg and change it's material to invisible (or I think there is a pink one (search in the Materials folder) that when applied doesn't show up in the game but does in the editor). To get the functionality of a trigger you'll still need to add a script and change the collision to trigger on the csg.

Link to comment
Share on other sites

I made something a while back, but when you use it with probes, the reflection of the trigger brushes get baked within it's reflection.

 

Josh said (a while back, mind you) he was gonna look into a "show in-game" option in which unlike "Hidden", would only have the entities Draw function skipped.

  • Upvote 2

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Make a material with the 'transparent.shader'

 

Then use this code:

function Script:Start()
 if not DEBUG then
   local material = Material:Create()
   material:SetBlendMode(5)--Blend.Invisible
   self.entity:SetMaterial(material)
   material:Release()
 end
end

 

This will make whatever the object is invisible at runtime (F6), but visible when debugging (f5) or in the editor.

Link to comment
Share on other sites

Yes, but if a trigger brush will get seen by the probe cameras and the reflection will have your trigger brush in the cubemap!

Yes, if you are using probes, you will need to hide the triggers in the editor prior to performing the GI option.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Yes, if you are using probes, you will need to hide the triggers in the editor prior to performing the GI option.

 

That's how I did it in the Vectronic Demo, it was kind of a pain tho.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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