• Create and call function and ENT:Touch form hammer entity
    2 replies, posted
So I want to create a entity in hammer, and when someone touches I want it to do something, for now I want to just try and get it to print that it's being touched. I have looked it up and found different answers, one being create a normal entity in Gmod and have the entity with the same name created in hammer, but I am having trouble making an invisible "point" entity (?) so that it is invisible and has no collisions so that players, props, and everything goes through it. Another answer being this bit of code. function KillTheGarage()for k,v inpairs(ents.FindByName("garage")) do         v:Fire("StartForward","",0) end end PS. I know endend isn't right but the editor wouldn't let me fix it xd. Anyway, with that bit of code I don't know how to start a function off of the entity for printing off a touch. My goal is to create a invisible custom entity in hammer with a name instead of like prop_static so that I can control it with lua and create a function and print or do something when it is being touched. Any help is appreciated, thanks
Hammer isn't an entity creator. It's a pre-existing entity placer and modifier, primarily used for map making and placing static (and sometimes dynamic/physics) props. If you want to place a custom prop into a hammer world, you have to code the SENT and then put it into hammer. I might be wrong tho. If you can code a prop_static in hammer, that would be cool. Im not a map maker.
Yes I know what hammer is, was just wondering about the custom entities, the answer led me off to another path which I am pretty sure would work better anyhow, so thanks I guess Ill just accept that answer rofl.
Sorry, you need to Log In to post a reply to this thread.