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

Playing FX

HOT
broken avatar :(
Created 9 years ago
by Centric
0 Members and 1 Guest are viewing this topic.
5,721 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
Signature
Learn by doing, not copy and pasting.

Enjoy my 2015 contest map, a simple map with bo1-bo2 features
http://ugx-mods.com/forum/index.php?topic=14968.msg149200#
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
So ive made multiple scripts now trying to get fx to play. Ive asked in the chat, ive messed with different functions to play fx, nothings worked. Heres my current setup to play it.

This is at the top of my GSC im using:
Code Snippet
Plaintext
level._effect[ "hum" ] 					= loadfx( "maps/zombie/fx_meteor_ambient" );

This is what im using to actually play the fx:
Code Snippet
Plaintext
ee1rock = GetEnt("ee1_rock", "targetname");
FXorg = spawn("script_origin",self getorigin());
FXorg EnableLinkTo();
FXorg LinkTo(ee1rock);
round_start = get_round(5);
if(round_start)
{
make_laughquake();
ee1clip moveZ(128,20);
ee1rock moveZ(128,20);
wait 10;
PlayFXOnTag(level.effect["hum"], self, FXorg );

This is what I have in my mod.csv to load the fx in:
Code Snippet
Plaintext
fx,maps/zombie/fx_meteor_ambient

I have no idea whats wrong here :/ any help is appreciated
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 2 days ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
You could try using UGX easy FX. It works great for me. http://ugx-mods.com/wiki/index.php?title=Easy-FX
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
You could try using UGX easy FX. It works great for me. http://ugx-mods.com/wiki/index.php?title=Easy-FX

I am using it, but for what I'm doing I need to be able to script it like this.
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 2 days ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Whoops, I misunderstood. Sorry.
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
I think you want:

Code Snippet
Plaintext
ee1rock = GetEnt("ee1_rock", "targetname");
FXorg = spawn("script_model",self getorigin());
FXorg setmodel("tag_origin);//no need to enablelinkto but you need a tag for playfxontag
FXorg LinkTo(ee1rock);
round_start = get_round(5);
if(round_start)
{
make_laughquake();
ee1clip moveZ(128,20);
ee1rock moveZ(128,20);
wait 10;
PlayFXOnTag(level.effect["hum"], FXorg, "tag_origin" );//Edit: updated mistake
Last Edit: September 02, 2015, 02:50:30 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
I think you want:

Code Snippet
Plaintext
ee1rock = GetEnt("ee1_rock", "targetname");
FXorg = spawn("script_model",self getorigin());
FXorg setmodel("tag_origin);//no need to enablelinkto but you need a tag for playfxontag
FXorg LinkTo(ee1rock);
round_start = get_round(5);
if(round_start)
{
make_laughquake();
ee1clip moveZ(128,20);
ee1rock moveZ(128,20);
wait 10;
PlayFXOnTag(level.effect["hum"], self, FXorg );

^^ this, and you do

Code Snippet
Plaintext
self getorigin());

but that prob needs to be?

Code Snippet
Plaintext
ee1rock getorigin());
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
The FX still doesn't play after making those changes. This is what it looks like now in case I managed to mess it up somehow...

Code Snippet
Plaintext
ee1()
{
ee1clip = GetEnt("ee1_clip", "targetname");
ee1rock = GetEnt("ee1_rock", "targetname");
FXoree1rock = GetEnt("ee1_rock", "targetname");
FXorg = spawn("script_model",ee1rock getorigin());
FXorg setmodel("tag_origin");
FXorg LinkTo(ee1rock);
round_start = get_round(5);
if(round_start)
{
make_laughquake();
ee1clip moveZ(128,20);
ee1rock moveZ(128,20);
wait 40;
PlayFXOnTag(level.effect["hum"], self, FXorg );
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
×
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
 I think I missguided you there sorry. Playfxontag should look like this:

Code Snippet
Plaintext
PlayFXOnTag(level.effect["hum"], FXorg, "tag_origin" );

If that don't work:

Can you get the fx to play at all? Just like using PlayFx? Did you add it to mod.csv correctly? When you say at the top of your gsc you are using, it is in the init or main function right?

Is your if statement true at this time? Did you try adding a println inside the if to check that the if is working?
Last Edit: September 02, 2015, 02:50:55 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
I think I missguided you there sorry. Playfxontag should look like this:

Code Snippet
Plaintext
PlayFXOnTag(level.effect["hum"], FXorg, "tag_origin" );

If that don't work:

Can you get the fx to play at all? Just like using PlayFx? Did you add it to mod.csv correctly? When you say at the top of your gsc you are using, it is in the init or main function right?

Is your if statement true at this time? Did you try adding a println inside the if to check that the if is working?

I haven't tried PlayFX with this script, but when I did with another script it didn't work either...

The FX is being loaded from the init function.
I also tried adding it to PrecacheMyFX in mapname.gsc aswell as making another function that loads before zombiemode main to load it, but none of those worked. I did have iprintlns, and it worked. The code after the fx works fine too.

This is how its added to the mod.csv, im pretty sure its right :/

Code Snippet
Plaintext
fx,maps/zombie/fx_meteor_ambient

Edit: tried PlayFX with both of these lines, neither worked:
Code Snippet
Plaintext
fx = playFX (level.effect["hum"],self.origin);
Code Snippet
Plaintext
fx = playFX (level.effect["hum"],ee1rock.origin);
Last Edit: September 03, 2015, 03:18:26 pm by Centric
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
×
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
Hmmmm.. Seems to me that the fx is not getting in maybe.

Do you have an ignore file at all that it could be being ignored in?

Did you try moving this to mapname.gsc in preCacheMyFX function?
Code Snippet
Plaintext
level._effect[ "hum" ] 					= loadfx( "maps/zombie/fx_meteor_ambient" );

while making sure that this is not commented out:
Code Snippet
Plaintext
level.DLC3.myFX = ::preCacheMyFX;
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Shouldnt this:

The FX still doesn't play after making those changes. This is what it looks like now in case I managed to mess it up somehow...

Code Snippet
Plaintext
ee1()
{
ee1clip = GetEnt("ee1_clip", "targetname");
ee1rock = GetEnt("ee1_rock", "targetname");
FXoree1rock = GetEnt("ee1_rock", "targetname");
FXorg = spawn("script_model",ee1rock getorigin());
FXorg setmodel("tag_origin");
FXorg LinkTo(ee1rock);
round_start = get_round(5);
if(round_start)
{
make_laughquake();
ee1clip moveZ(128,20);
ee1rock moveZ(128,20);
wait 40;
PlayFXOnTag(level.effect["hum"], self, FXorg );

Be in a while loop? Since I was scripting the other day and I couldnt get something similar to work and then I asked Ege115 help and he said to add while loop. Since it only checked the script once at start of game, then since it didnt check it again at the part I wanted it to happen, it didnt work
Last Edit: September 03, 2015, 06:18:57 pm by HitmanVere
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
Shouldnt this:

Be in a while loop? Since I was scripting the other day and I couldnt get something similar to work and then I asked Ege115 help and he said to add while loop. Since it only checked the script once at start of game, then since it didnt check it again at the part I wanted it to happen, it didnt work
normally yes but since he said the rest of the script is working im going to take a guess and say the method is being called in a loop already
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
Hmmmm.. Seems to me that the fx is not getting in maybe.

Do you have an ignore file at all that it could be being ignored in?

Did you try moving this to mapname.gsc in preCacheMyFX function?
Code Snippet
Plaintext
level._effect[ "hum" ] 					= loadfx( "maps/zombie/fx_meteor_ambient" );

while making sure that this is not commented out:
Code Snippet
Plaintext
level.DLC3.myFX = ::preCacheMyFX;

I tried adding the FX there, and its not commented out but still nothing. I tried adding it to my _patch.csv and mapname.csv just in case. Absolutely nothing works :/ And the only ignore file in my mod tools is common_ignore which is empty.
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
×
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
Man, I am at a loss. Have you tried moving the fx to a higher folder? Like make a new folder:

Code Snippet
Plaintext
level._effect[ "hum" ] 					= loadfx( "mycustom/fx_meteor_ambient" );

Did you try and add it to mapname.csc in the preCacheMyFX function there?

I'm just throwing anything out there that is different from what I do and what you have here. I don't have any fx that go to more than one folder and I normally add my fx to both gsc and csc as well as csv.

Are you getting any errors when you build?

I assumed the fx plays in efx ed?
Last Edit: September 04, 2015, 03:36:47 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Problem could be also, that FX is in more than 1 .csv, if it is. FX needs to be only in 1 .csv

 
Loading ...