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

Play looped effect?

broken avatar :(
Created 9 years ago
by Undeadmetal
0 Members and 1 Guest are viewing this topic.
1,565 views
broken avatar :(
×
broken avatar :(
Location: usOregon
Date Registered: 20 August 2014
Last active: 3 months ago
Posts
308
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Coding Hobbyist, Application & Web Development
Signature
×
Undeadmetal'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
Undeadmetal's Contact & Social LinksOnlyAGamer
So I'm having issues here as I don't script much and I need this to work but Idk what I would put in place of level._effect because the game says it doesn't understand that for the playLoopedFx part.

Code Snippet
Plaintext

main()
{
level._effect = loadFX ("env/light/fx_lgiht_ceiling_amber_dim_dl")


playLoopedFX (level._effect, 0.05, (0,180,108));

}

Marked as best answer by Undeadmetal 9 years ago
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
You have to precache your effect first in your preCacheMyFX() function in mapname.gsc for example, like this:
Code Snippet
Plaintext
level._effect[ "name_of_fx" ] = loadfx( "env/light/fx_lgiht_ceiling_amber_dim_dl" );
And then to play the fx, in the function you're making:
Code Snippet
Plaintext
playLoopedFX (level._effect[ "name_of_fx" ], 0.05, (0,180,108));
You missed the ";" at the end of the first line, that's the error you're getting. Also, you can't use the level._effect variable like that, as it's an array and you're resetting it as a normal variable and overwriting every other effect.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 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
What soy said, and to add to it, I've found some script placers have the call to precachemyfx() commented out, just fyi. If it's commented out, you would have to uncomment the call to it at the least.

Code Snippet
Plaintext
level.DLC3.myFX = ::preCacheMyFX;

//you may also need to add the function
preCacheMyFX(){


}
Last Edit: April 14, 2016, 07:42:55 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: usOregon
Date Registered: 20 August 2014
Last active: 3 months ago
Posts
308
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Coding Hobbyist, Application & Web Development
×
Undeadmetal'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
Undeadmetal's Contact & Social LinksOnlyAGamer
Thanks will figure this out after I figure out what I screwed up earlier lol  ;D

 
Loading ...