General > Developers Corner

Pointshop - Adding Trails

<< < (6/8) > >>

Zmaster:
"What did you change? That could have caused an issue."
I believe all I did was change the location of the ZmaSaw thing after the "$basetexture" part of it

"Also, is it possible that modifications.color isn't being set? That might be why it's invisible as well. You might changing that to something like.. Color(255,255,255,255) just as a test."
Where would I do that? Ingame? If so, that's what it's set to there.


"They have
$basetexture coast\shingle_01

try changing yours to:
$basetexture ZmaSaw"
Just did this.

--- Code: ---"UnlitGeneric"
{
        "$basetexture" "ZmaSaw"
        "$vertexalpha" 1
        "$vertexcolor" 1
}
--- End code ---
Still shows nothing when I walk around.

MrPresident:
Are you seeing anything in your client console about missing textures or anything like that?

Other than the things I've already suggested, I don't really know what else is going on. I use PNG files for all my GUI/Material stuff now since GM13 allows it. I'm not super familiar with VMT/VTF.

Neku:
I've gone ahead and dug up a couple of .vmt's belonging to trails.


--- Code: ---"UnlitGeneric"
{
"$baseTexture" "trails/8bitarrow"

"$additive" 0
"$vertexcolor" 1
"$vertexalpha" 1
}
--- End code ---

From what I've seen from your's, it does not include $additive.

Zmaster:
For Neku:
I added the part that was missing
Now when I go to the PointShop, it will show the correct image in the PointShop, but when I walk around after equipping the trail, it shows nothing.


For MrPresident:
I didn't check before this, but after I fixed the thing Neku told me to do (talked about it earlier in this post), I have nothing in my client console that says anything related to the missing texture.

Current Problem: Correct image of trail shows when in PointShop menu. It does not show when I walk around. (Nothing shows at all when I walk around)

Neku:

--- Code: ---ITEM.Name = 'Saw'
ITEM.Price = 500
ITEM.Material = 'materials/ZmaSaw.vmt'
 
function ITEM:OnEquip(ply, modifications)
ply.LaserTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material)
end

function ITEM:OnHolster(ply)
SafeRemoveEntity(ply.LaserTrail)
end

function ITEM:Modify(modifications)
PS:ShowColorChooser(self, modifications)
end

function ITEM:OnModify(ply, modifications)
SafeRemoveEntity(ply.LaserTrail)
self:OnEquip(ply, modifications)
end
--- End code ---

This is your item.lua. You still have the ply.LaserTrail in that. Change it to something like, ply.SawTrail.
It should look like this:

--- Code: ---ITEM.Name = 'Saw'
ITEM.Price = 500
ITEM.Material = 'materials/ZmaSaw.vmt'
 
function ITEM:OnEquip(ply, modifications)
ply.SawTrail = util.SpriteTrail(ply, 0, modifications.color, false, 15, 1, 4, 0.125, self.Material)
end

function ITEM:OnHolster(ply)
SafeRemoveEntity(ply.SawTrail)
end

function ITEM:Modify(modifications)
PS:ShowColorChooser(self, modifications)
end

function ITEM:OnModify(ply, modifications)
SafeRemoveEntity(ply.SawTrail)
self:OnEquip(ply, modifications)
end
--- End code ---

I'm not saying this will fix it, but it was conflicting with your laser trail.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version