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

Problems with playing fx's. *Sigh*

HOT
broken avatar :(
Created 11 years ago
by Ege115
0 Members and 1 Guest are viewing this topic.
6,409 views
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 10 months 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
I seem to be the only one who can't get a fx working. I tried the powerup fx but doesn't work either.
Code Snippet
Plaintext
fx()
{
ent = getentarray("train_light","targetname");

fx_origin = spawn ("script_model",ent.origin);
fx_origin setmodel ("tag_origin");

PlayFxOnTag(level._effect["powerup_on"], fx_origin, "tag_origin");
fx_origin linkto(ent);
}
Last Edit: April 19, 2014, 09:16:54 am by Ege115
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,186
Respect
1,369Add +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 LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
I seem to be the only one who can't get a fx working. I tried the powerup fx but doesn't work either.
Code Snippet
Plaintext
fx()
{
ent = getentarray("train_light","targetname");

fx_origin = spawn ("script_model",ent.origin);
fx_origin setmodel ("tag_origin");

PlayFxOnTag(level._effect["powerup_on"], fx_origin, "tag_origin");
fx_origin linkto(ent);
}

Is it an actual array you're wanting to call this on? Then add a for loop, otherwise change getentarray to getent..
Now your spawning the fx_origin on an array (ent.origin) don't think that works..
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 5 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
Now your spawning the fx_origin on an array (ent.origin) don't think that works..
Yeah, it doersn't. Also same goes for LinkTo() with an array.

- Phil.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 10 months 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
Is it an actual array you're wanting to call this on? Then add a for loop, otherwise change getentarray to getent..
Now your spawning the fx_origin on an array (ent.origin) don't think that works..
:o :o, it worked now, so all this was because the nooby Ege115 who had a stupid array that wont work if you want to link or play a fx on?

Wow, This is the most nooby thing I have done in scripting. Thank you so much for the help Phil and Bluntstuffy.

I will give you both +1
Last Edit: April 19, 2014, 10:10:54 am by Ege115
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,186
Respect
1,369Add +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
×
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 LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
Good  you got it working now! And if you want you can use it on an array, with something like this:

Code Snippet
Plaintext
fx()
{
ent = getentarray("train_light","targetname");

for(i=0;i<ent.size;i++)
{
ent[i].fx_origin = spawn ("script_model",ent[i].origin);
ent[i].fx_origin setmodel ("tag_origin");

PlayFxOnTag(level._effect["powerup_on"], ent[i].fx_origin, "tag_origin");
ent[i].fx_origin linkto(ent[i]);
}
}

 
Loading ...