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

[Tutorial] Black Ops 2 Style Wall Weapon FX

HOT
broken avatar :(
Created 9 years ago
by Scobalula
0 Members and 1 Guest are viewing this topic.
12,423 views
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Code Snippet
Plaintext
init_weapon_upgrade()
{
weapon_spawns = [];
weapon_spawns = GetEntArray( "weapon_upgrade", "targetname" );
// playfx("wall_weapon_light", weapon_spawns.origin); // not here

for( i = 0; i < weapon_spawns.size; i++ )
{
hint_string = get_weapon_hint( weapon_spawns[i].zombie_weapon_upgrade );

weapon_spawns[i] SetHintString( hint_string );
weapon_spawns[i] setCursorHint( "HINT_NOICON" );
weapon_spawns[i] UseTriggerRequireLookAt();

weapon_spawns[i] thread weapon_spawn_think();
model = getent( weapon_spawns[i].target, "targetname" );
               
                playfx("wall_weapon_light", weapon_spawns[ i ].origin); // here instead, so it plays per member of the array, using the member as a point of origin

model hide();
}
}

could also use

weapon_spawns.target

to grab the model from the prefab and use that instead of the trigger itself

I think hes right, need to load it before zombiemode::main() i think, I always load fx in my init functions, which are called prior to that

Surprisingly that didn't work either, I'll look into it in more dept tomorrow, it's late here haha, thanks for the help though, really appreciate it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
Code Snippet
Plaintext
init_weapon_upgrade()
{
weapon_spawns = [];
weapon_spawns = GetEntArray( "weapon_upgrade", "targetname" );
// playfx("wall_weapon_light", weapon_spawns.origin); // not here

for( i = 0; i < weapon_spawns.size; i++ )
{
hint_string = get_weapon_hint( weapon_spawns[i].zombie_weapon_upgrade );

weapon_spawns[i] SetHintString( hint_string );
weapon_spawns[i] setCursorHint( "HINT_NOICON" );
weapon_spawns[i] UseTriggerRequireLookAt();

weapon_spawns[i] thread weapon_spawn_think();
model = getent( weapon_spawns[i].target, "targetname" );
               
                playfx("wall_weapon_light", weapon_spawns[ i ].origin); // here instead, so it plays per member of the array, using the member as a point of origin

model hide();
}
}

could also use

weapon_spawns.target

to grab the model from the prefab and use that instead of the trigger itself

I think hes right, need to load it before zombiemode::main() i think, I always load fx in my init functions, which are called prior to that

You mean model.origin I think.


I meant he was missing the level._effect["wall_weapon_light"] = part. He just has the load fx part, without establishing the key. Yours is also missing that, of course, when you try to play it.
Last Edit: July 03, 2015, 12:34:22 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,005Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Quote
level._effect["wall_weapon_light"] = part

that was what i meant ;)

Quote
model.origin
well yea you would use the origin, i just meant that .target is referring to the model in question. so yea .target.origin would be used for playing the fx :)
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Updated tutorial, thanks to Hitman for the script and to everyone else for helping. :D
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Updated with better FX rather than just a light, it actually has a little "flare" that shows, and will disappear as you get close.

Updated script part of the tutorial with less steps.
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 7 years ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
Signature
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access


could also use

weapon_spawns.target

to grab the model from the prefab and use that instead of the trigger itself



if you use weapon_spawns.target and play fx on model
most prefabs have half of the gun is in the wall and the origin of the weapon model is in wall?
also some  weapon origins are not centered on the model  so fx will  play few units away from the center of the prefab?
Just wondering :)

Last Edit: July 18, 2016, 02:07:26 pm by thezombieproject
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 11 days ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
if you use weapon_spawns.target and play fx on model
most prefabs have half of the gun is in the wall and the origin of the weapon model is in wall?
also some  weapon origins are not centered on the model  so fx will  play few units away from the center of the prefab?
Just wondering :)
In BO2 the blue light fx around the chalk shows because all of the weapon chalk in BO2 is done by FX, and so they added that as just a little feature to make it stand out more, idk. But in BO2 they play the fx at the model origin is it should be fine because the model isn't 'in' the wall, its 'on' the wall.
Or even play fx at the origin of the trig, unless the angle matters.
Two things I want to say.
#1: I noticed in BO2 FX that there is a billboard sprite flare and an oriented sprite flare. So if you want to, you could make both, but that would mean angles would matter.
#2: You can use angles in PlayFX, like this:
Code Snippet
Plaintext
PlayFX( fx, origin, AnglesToForward( angles ), AnglesToUp( angles ) );

 
Loading ...