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

FX Tutorial

broken avatar :(
Created 2 years ago
by shippuden1592
0 Members and 1 Guest are viewing this topic.
942 views
broken avatar :(
×
broken avatar :(
Location: mxGuanajuato
Date Registered: 5 May 2013
Last active: 5 days ago
Posts
225
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
If you do not take risks, you can not create a fut
×
shippuden1592's Groups
1.-Open your map and create script_structs where you want the fx to appear.
Now add these kvps:
Code Snippet
Plaintext
targetname        fx_struct
script_noteworthy    NAME_CACHE_FX
NAME_CACHE_FX: It is the name of your loaded FX.
 
2.-Open your zombie_mapname.gsc and below
under of:
Code Snippet
Plaintext
main ()
{
Add your fx like this:
Code Snippet
Plaintext
level._effect["NAME_CACHE_FX"]            = loadfx( "LOCATION_FX" );
Examples:
Code Snippet
Plaintext
level._effect["fx_mp_smoke_thick_indoor"] = loadfx("maps/zombie/fx_mp_smoke_thick_indoor");
level._effect["fx_mp_smoke_amb_indoor_misty"] = loadfx("maps/zombie/fx_zombie_theater_smoke_amb_indoor");
   
In your zombie_mapname_fx.gsc file there are some fx loaded, if you want to use one of them it is no longer necessary to add it.
you have to look for this line:
Code Snippet
Plaintext
maps\_zombiemode::main();
under it add this:
Code Snippet
Plaintext
fx_struct = getstructarray( "fx_struct", "targetname" );
    array_thread(fx_struct_think, ::fx_struct_think);
at the end of the .gsc add this:
Code Snippet
Plaintext
fx_struct_think()
{
    self.tag_origin = spawn("script_model", self.origin);
    self.tag_origin setmodel("tag_origin");
    self.tag_origin.angles = self.angles;
   
    playfxontag(level._effect[self.script_noteworthy], self.tag_origin, "tag_origin");
}
3.-In your mod.csv add the fx you used:
Example:
Code Snippet
Plaintext
fx,maps\zombie\fx_mp_smoke_thick_indoor
fx,maps\zombie\fx_zombie_theater_smoke_amb_indoor

Last Edit: February 14, 2024, 03:24:05 am by shippuden1592
<31
broken avatar :(
×
broken avatar :(
Location: veValencia, Carabobo
Date Registered: 30 January 2021
Last active: 7 days ago
Posts
22
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Klaudeh's Groups
Klaudeh's Contact & Social LinksKlaudeh KlaudehKlaudeh
Hi Shippuden! i was trying to use this code in a map and it worked! Thanks for the help with the fx's, but there was a little error in the array_thread part, is something simple but i leave it here if someone else want to try this (Btw i tried the code in World at War and works just fine ;))
 
In this part of the code:
Code Snippet
Plaintext
fx_struct = getstructarray( "fx_struct", "targetname" );
    array_thread(killhouse_struct, ::fx_struct_think);

 It should be:
 
Code Snippet
Plaintext
fx_struct = getstructarray( "fx_struct", "targetname" );
    array_thread(fx_struct, ::fx_struct_think);

And that is!
Last Edit: September 27, 2023, 01:05:17 pm by Klaudeh
broken avatar :(
×
broken avatar :(
Location: cuMars
Date Registered: 22 April 2022
Last active: 7 days ago
Posts
83
Respect
Forum Rank
Rotting Walker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
i like making small bo1 maps
Signature
R
×
Box Map ELITE #1's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Box Map ELITE #1's Contact & Social LinksPamojoYTPamojoYTPamojoYT#7794
this does not work for bo1
 

 
Loading ...