UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

get surface type shot?

broken avatar :(
Created 8 years ago
by whippytrout
0 Members and 1 Guest are viewing this topic.
2,067 views
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 8 months ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
×
whippytrout's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
I'm working on a wonder weapon that does something upon impact but I only want it to do it on certain textures. For example if I shoot a brick texture nothing happens but If I shoot a specifically made texture such as "custom1" then the weapon impact will work. Right now it works on every surface type which is not what I want. Is there a way to get what surface or texture is being shot? Or maybe another way to force it to only work on certain textures?

Thanks,
Whippy
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
as of my knowledge there isnt :P orry, you could just add some like trigger to radient of were you dont want it to activate or something like that
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 February 2013
Last active: 6 years ago
Posts
186
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Community Scripter
My Groups
More
Personal Quote
Every map needs a Panzer Soldat
Signature
HexPieRadiBirds Magical Fun Time Water Hole
×
AwesomePieMan's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
AwesomePieMan's Contact & Social Links
I'm working on a wonder weapon that does something upon impact but I only want it to do it on certain textures. For example if I shoot a brick texture nothing happens but If I shoot a specifically made texture such as "custom1" then the weapon impact will work. Right now it works on every surface type which is not what I want. Is there a way to get what surface or texture is being shot? Or maybe another way to force it to only work on certain textures?

Thanks,
Whippy

There is a way of getting what surface is shot.  I'm not sure if there is a way to get what texture is shot, but this is how you do surface:
Code Snippet
Plaintext
trace = BulletTrace( start, end, false, undefined );
if ( trace[ "surfacetype" ] != "water" )
(Example code from  _utility.gsc)

As you can see, one of the things you can check when doing bullettrace is the surface type that was hit (in this example it checking if trace["surfacetype"] is not water).  I don't think you can check for textures specifically, but you can make the one texture you want to accept hits something like snow (or anything) in asset manager and then not use that texture type anywhere else in your map.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2015
Last active: 7 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Member
Signature
×
liamsa669's Groups
liamsa669's Contact & Social Links
so you want your own surface type?
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 8 months ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
whippytrout's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
There is a way of getting what surface is shot.  I'm not sure if there is a way to get what texture is shot, but this is how you do surface:
Code Snippet
Plaintext
trace = BulletTrace( start, end, false, undefined );
if ( trace[ "surfacetype" ] != "water" )
(Example code from  _utility.gsc)

As you can see, one of the things you can check when doing bullettrace is the surface type that was hit (in this example it checking if trace["surfacetype"] is not water).  I don't think you can check for textures specifically, but you can make the one texture you want to accept hits something like snow (or anything) in asset manager and then not use that texture type anywhere else in your map.

Thanks man! I'll let you know what happens and if i get it working.

so you want your own surface type?
I'm not sure exactly how I want it to work. I'm thinking of excluding certain surfaces like AwesomePieMan said and then it will work almost everywhere in my map that I need it to. Sorry I can't elaborate but I'ts a wonder weapon I'd like to keep secret.  ;)

 
Loading ...