TeamSpen210 wrote:
What you should try doing is create a template infodecal in some room, which has the texture and targetname set. Setup an env_entity_maker and point_template to spawn it, and then you can use the special entity_maker methods to spawn the decal at a position. Since it has a targetname, the entity should stay around until you send the activate input. That means you should be able to do AddOutput to set the targetname.
Thank you for your reply. I am already doing everything up untill the last sentence, "That means you should be able to do AddOutput to set the targetname." But I'm not sure why changing the name of the infodecal would help. I was changing the name at first because I wanted to detect decals in a radius, and find te decals within the same radius of each of those, and so on, then I wanted to toggle the texture of each of those. to do that, I would need a name. But the infodecals kill themselves after they sprey, so that doesn't help anymore.
Maybe it would help if I explain what I'm trying to do. I'm trying to create a gel that can be used as a dynamic antiline. You have a button, and a door. You try to find a way to place a line of this gel between the button and the door. You press the button, the gel connecting the button and the door turns from yellow to black, and opens the door. I have a gel bomb with a new gel texture. I have a couple of functions that finds the place of the impact, and use a entity_maker to place an infodecal and a info_target on that spot. The infodecal is the gel in it's black form. When a button is pressed, it calls a function that finds all info_targets with a specific name within a radius, and places the yellow gel splat decal over that, and changes the name of that info_target. Then it has the info_target call the same function, pretty much spreading the output along the gel. In that function, I plan to add a fireuser_1 output to any entity to activate anything. Deactivation shouldn't be too hard after this is working. My problem is that the extra gel splats covering each other are creating a lot of lag, placing the black gel over the yellow doesn't work, as it ends up under the yellow, so the gel won't 'deactivate', and when I start scripting clear gel to work with this, it won't be able to remove the gel.
My current idea for fixing this: I've noticed that when the gel splats are placed in the same spot over and over again under the dropper, lag isn't a problem. Also, when the black gel is placed over the yellow gel, it goes under the yellow gel, possibly as if it's replacing the black gel splat that is already under the yellow texture. I'm guessing that the lowpriority value does remove the texture beneath it and replace it with itself. With that assumption, I think that if that texture does have multiple frames, then if I were to spawn the same texture, but on the yellow frame over the black frame, or the black frame over the yellow frame, or an alpha frame over any of the others, I could change the texture of, or even remove the decal. That's why I'm asking if there is a way to spawn a texture at a specific frame. While writing this out, I've got an idea for how to do that that I'll be trying shortly. I'll post if it works. (I understand that this last method is a huge stretch and probably won't work, but I'm running out of ideas, and I've come so far with this.)
Edit: idea for starting decal on second frame didn't work, tried using the 'skin' value. Still looking for another way to start the decal on another frame.