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

Is there a way to end a looping fx in script?

broken avatar :(
Created 10 years ago
by whippytrout
0 Members and 1 Guest are viewing this topic.
4,253 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 need help stopping a looping fx in script. For example:

Code Snippet
Plaintext
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
wait(60);
// something here to kill the fx

I know its probably a dumb question but it would make my life easier if i could stop the fx.  :troll:

Otherwise i'll have to edit the fx which i don't really want to do.  :lol:

Thanks,

Whippytrout
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
return
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
try doing this:

Code Snippet
Plaintext
level.use_fx = true;
while(level.use_fx == true)
{
       playfx(level._effect[fx], fx.origin)
       wait(1);
}
Last Edit: May 13, 2014, 02:19:01 am by daedra descent
Marked as best answer by whippytrout 10 years ago
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 9 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
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.
Yes. Loop the fx using EffectsEd settings so that you can use playFXonTag().

Code Snippet
Plaintext
fx = spawn( "script_model", some_origin );
fx setModel( "tag_origin" );
fx.angles = some_angles;
PlayFxOnTag( level._effect[some_fx], fx, "tag_origin" );

//wait some time or whatever event happens

fx delete();
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
ye do as trem said. as when you loop an fx using the looped fx function theres no human power which can stop it lol
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
Works great now, but is there a way to stop the fx then still be able to use it again later with the same trig?
Right now i activate the trigger, the fx plays then stops after 60 seconds then the trigger reactivates after an additional 45 seconds but when I trigger it again there is no fx because i deleted the tag it was playing on earlier. Is there a way to just stop the fx and not delete it?
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Works great now, but is there a way to stop the fx then still be able to use it again later with the same trig?
Right now i activate the trigger, the fx plays then stops after 60 seconds then the trigger reactivates after an additional 45 seconds but when I trigger it again there is no fx because i deleted the tag it was playing on earlier. Is there a way to just stop the fx and not delete it?

My method of FX looping should do just that.
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
Works great now, but is there a way to stop the fx then still be able to use it again later with the same trig?
Right now i activate the trigger, the fx plays then stops after 60 seconds then the trigger reactivates after an additional 45 seconds but when I trigger it again there is no fx because i deleted the tag it was playing on earlier. Is there a way to just stop the fx and not delete it?

You have to re spawn the script_model again, each time you want to play the fx on it, since you delete it to stop it.

...set the models, set the angles, blah blah blah
Last Edit: May 13, 2014, 08:52:10 pm by MakeCents
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 9 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
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.
Works great now, but is there a way to stop the fx then still be able to use it again later with the same trig?
Right now i activate the trigger, the fx plays then stops after 60 seconds then the trigger reactivates after an additional 45 seconds but when I trigger it again there is no fx because i deleted the tag it was playing on earlier. Is there a way to just stop the fx and not delete it?
Just keep spawning it and deleting it, that's how I do it for everything. That way you don't have an ent spawned when you don't need one.
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
you could hide and show it if you really are lazy but trems way works
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 17 hours ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
By making a loop.
Code Snippet
Plaintext
for(;;)
{
fx = spawn( "script_model", some_origin );
fx setModel( "tag_origin" );
fx.angles = some_angles;
PlayFxOnTag( level._effect[some_fx], fx, "tag_origin" );

//wait some time or whatever event happens

fx delete();
wait 1;//change this to how long the fx is playing, or else the fx will spawn while the ohter is still playing as it would slow the game down due to the FPS.
}
Last Edit: May 13, 2014, 09:16:17 pm by Ege115
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
Wow thanks guys it works good now.  ;D  Last small question then I'll mark the best answer. Is there a way to play the same fx in multiple spots when triggered. Is there a way I can use an array or do I have to spawn more fx in the script?
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 9 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
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.
Wow thanks guys it works good now.  ;D  Last small question then I'll mark the best answer. Is there a way to play the same fx in multiple spots when triggered. Is there a way I can use an array or do I have to spawn more fx in the script?
Each fx is going to cost a spawned ent, no matter how you organize it (array, etc). If you want to use playFx() it wont cost you anything but you cant stop it whenever you want.
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
Thank you guys for all your help. I dont know which answer is the best so i'll just pick one.  ;)

Thanks again,
Whippytrout

 
Loading ...