Can infodecals be stored as handles?
Quote from Goldenknighttim on January 14, 2015, 2:10 pmHey, I've got another scripting question. I'm trying to place a decal and store it in an array:
[spoiler]function create_splat(position)
{
local new_splat = Entities.CreateByClassname("infodecal")
EntFireByHandle(new_splat, "AddOutput", "targetname splatdecal", 0, null, null)
EntFireByHandle(new_splat, "AddOutput", "LowPriority 1", 0, null, null)
EntFireByHandle(new_splat, "AddOutput", "texture paintblobs/blob_splat_stick", 0, null, null)
EntFireByHandle(new_splat, "AddOutput", "vscripts custom/linking-yellow/linking-yellow_gel.nut", 0, null, null)
new_splat.SetOrigin(position)
//The decal does not show up in the specified spot unless I use an entity maker and ignore this function.
//printl(new_splat.GetName())
::splat_list.append(new_splat)
}[/spoiler]Before this, I was trying the FindByNameWithin() function after creating it with an entity maker. Neither of these methods are storing any handle value in the variable. I'm starting to wonder if it's even possible to hold infodecals in a handle variable. I need to be able to change the names of the infodecals dynamically so I can set a texturetoggle up to switch the texture of dynamically specified infodecals. Has anyone else had problems with this, or can anyone see something wrong with my logic?
Hey, I've got another scripting question. I'm trying to place a decal and store it in an array:
Before this, I was trying the FindByNameWithin() function after creating it with an entity maker. Neither of these methods are storing any handle value in the variable. I'm starting to wonder if it's even possible to hold infodecals in a handle variable. I need to be able to change the names of the infodecals dynamically so I can set a texturetoggle up to switch the texture of dynamically specified infodecals. Has anyone else had problems with this, or can anyone see something wrong with my logic?
Quote from Goldenknighttim on January 14, 2015, 3:28 pmI was calling the function from the wrong spot. The infodecal is being created, but the addoutput entfires don't seem to be firing because when I use GetName() it comes up blank, and I can't see the decal image in the specified spot.
Edit: It's also not being added to the array, so still kinda the same problem.
I was calling the function from the wrong spot. The infodecal is being created, but the addoutput entfires don't seem to be firing because when I use GetName() it comes up blank, and I can't see the decal image in the specified spot.
Edit: It's also not being added to the array, so still kinda the same problem.
Quote from FelixGriffin on January 15, 2015, 8:52 amAccording to the VDC, infodecal entities are removed immediately after "spraying" (either when the map loads or when given the Activate input).
According to the VDC, infodecal entities are removed immediately after "spraying" (either when the map loads or when given the Activate input).
Quote from Goldenknighttim on January 15, 2015, 2:39 pmThat would explain a lot, except for the fact that I can still use a texturetogglecon them after they have applied themselves to the wall.
That would explain a lot, except for the fact that I can still use a texturetogglecon them after they have applied themselves to the wall.
Quote from Skotty on January 15, 2015, 3:56 pmThis might be because the toggle texture command applies global to all object using the given material.
This might be because the toggle texture command applies global to all object using the given material.
Quote from Goldenknighttim on January 15, 2015, 5:07 pmOk, well something changed in how I was testing things that is now causing the decals to not be able to toggle texture. I'll have to try to find out why it was ever working in the first place. But It's really looking now like I'm not going to be able to choose specific decals to edit he way I hoped.. Thanks for your help guys.
Ok, well something changed in how I was testing things that is now causing the decals to not be able to toggle texture. I'll have to try to find out why it was ever working in the first place. But It's really looking now like I'm not going to be able to choose specific decals to edit he way I hoped.. Thanks for your help guys.
Quote from Skotty on January 15, 2015, 5:50 pminfo_overlay work like decals, but might be able to get manipulated in game. Take a look on them.
info_overlay work like decals, but might be able to get manipulated in game. Take a look on them.
Quote from Goldenknighttim on January 15, 2015, 6:01 pmYeah, I was working with those first. They are really difficult to place in calculated positions, and looks impossible because they each need a brush number to attach to, and a specific angle. My new plan is to create an info_target at the same place, and instead of toggling the texture, I'm going to place another decal over the same spot. If low priority is set to yes, it would probably replace one decal with the new one, and I can replace again when toggling back.
Yeah, I was working with those first. They are really difficult to place in calculated positions, and looks impossible because they each need a brush number to attach to, and a specific angle. My new plan is to create an info_target at the same place, and instead of toggling the texture, I'm going to place another decal over the same spot. If low priority is set to yes, it would probably replace one decal with the new one, and I can replace again when toggling back.
Quote from Goldenknighttim on January 17, 2015, 12:21 pmSo I tried placing the second decal over the first, while both are set to low priority. The problem now is that the older decals are not going away. The 2 decals are exaclty the same size, and are in exactly the same place. From what I can tell about the LowPriority setting on infodecals from the Valve Developer Comunity, this should be removing the old decal. Does anyone have any idea why older decals are not being removed. Is there another way to remove decals?
So I tried placing the second decal over the first, while both are set to low priority. The problem now is that the older decals are not going away. The 2 decals are exaclty the same size, and are in exactly the same place. From what I can tell about the LowPriority setting on infodecals from the Valve Developer Comunity, this should be removing the old decal. Does anyone have any idea why older decals are not being removed. Is there another way to remove decals?
Quote from FelixGriffin on January 18, 2015, 2:50 pmThe low priority setting only applies when the number of decals placed exceeds the engine's limit. I think it's usually used for things like bullet holes (in HL2).
The low priority setting only applies when the number of decals placed exceeds the engine's limit. I think it's usually used for things like bullet holes (in HL2).