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

Adding Custom effects2

broken avatar :(
Created 7 years ago
by Archaicvirus
0 Members and 1 Guest are viewing this topic.
2,056 views
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 12 months ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
Signature
Let he who has not sinned cast the first stone.
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
Does anyone know the proper method to set up fx via script? I used ugx easyfx for codwaw, and understand that fx need to be precached whether they are custom or stock.

The problem I'm having is that I've tried to precache an existing effect - electric\fx_elec_sparks_bounce_blue and launcher won't load the map. This is the final error output through the launcher console -
^1
^1^
^1ERR(6E) scripts/zm/zm_montys_lab.gsc (87,0)  : Compiler Internal Error :  Unresolved external 'zm_weapons::load_weapon_spec_fr0m_table'

 I have a very simple function to test adding in fx, for controlling via scripting. It's a snippet from a codwaw project I was working on.

Code Snippet
Plaintext
#define E115_FX			"electric\fx_elec_sparks_bounce_blue"
#precache( "fx", E115_FX );

function e115_init(){
level flag::wait_till( "all_players_connected" );
elec_orb = Spawn("script_model",player.origin);
elec_orb SetModel("tag_origin");
PlayFXOnTag(E115_FX, elec_orb, "tag_origin");
level thread e115_update();
}

function e115_update(){
while(1){
f = anglesToForward(player.angles)*50;
r = anglesToRight(player.angles)*30+f;
r += (0,0,60);
elec_orb MoveTo(player.origin + r, .1, .0, 0);
wait(0.5);
}
}


I've tried precaching in the right places from what I can remember, but I can't get it work. I've looked for a topic on this issue for BO3 and can't find any clear tutorials. Any help would be appreciated.  This is my mapname.gsc -
Code Snippet
Plaintext
#using scripts\codescripts\struct;

#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\compass;
#using scripts\shared\exploder_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\math_shared;
#using scripts\shared\scene_shared;
#using scripts\shared\util_shared;

#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;

#insert scripts\zm\_zm_utility.gsh;

#using scripts\zm\_load;
#using scripts\zm\_zm;
#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_powerups;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_zonemgr;
//#using scripts\zm\_zm_blockers;

#using scripts\shared\ai\zombie_utility;

//Perks
#using scripts\zm\_zm_pack_a_punch;
#using scripts\zm\_zm_pack_a_punch_util;
#using scripts\zm\_zm_perk_additionalprimaryweapon;
#using scripts\zm\_zm_perk_doubletap2;
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_juggernaut;
#using scripts\zm\_zm_perk_quick_revive;
#using scripts\zm\_zm_perk_sleight_of_hand;
#using scripts\zm\_zm_perk_staminup;

//Powerups
#using scripts\zm\_zm_powerup_double_points;
#using scripts\zm\_zm_powerup_carpenter;
#using scripts\zm\_zm_powerup_fire_sale;
#using scripts\zm\_zm_powerup_free_perk;
#using scripts\zm\_zm_powerup_full_ammo;
#using scripts\zm\_zm_powerup_insta_kill;
#using scripts\zm\_zm_powerup_nuke;
#using scripts\zm\montys_test;
//#using scripts\zm\_zm_powerup_weapon_minigun;

//Traps
#using scripts\zm\_zm_trap_electric;

#using scripts\zm\zm_usermap;

//*****************************************************************************
// MAIN
//*****************************************************************************

function main()
{
zm_usermap::main();
level thread e115_init();
level._zombie_custom_add_weapons =&custom_add_weapons;

//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );

level.pathdist_type = PATHDIST_ORIGINAL;
}

function usermap_test_zone_init()
{
zm_zonemgr::add_adjacent_zone("start_zone","zone2","enter_zone2");

level flag::init( "always_on" );
level flag::set( "always_on" );
}

function custom_add_weapons()
{
zm_weapons::load_weapon_spec_fr0m_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}

And my zone file -
Code Snippet
Plaintext
>class,zm_mod_level
>group,modtools

xmodel,skybox_default_day
material,luts_t7_default
fx,electric\fx_elec_sparks_bounce_blue //<----------------
// BSP
col_map,maps/zm/zm_montys_lab.d3dbsp
gfx_map,maps/zm/zm_montys_lab.d3dbsp

// Audio
sound,zm_montys_lab

scriptparsetree,scripts/zm/zm_montys_lab.gsc
scriptparsetree,scripts/zm/zm_montys_lab.csc
Marked as best answer by Archaicvirus 7 years ago
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
Your error has nothing to do with your FX, the error says there is no function named
Code Snippet
Plaintext
load_weapon_spec_fr0m_table
i have a feeling it is because in the word "from" there is a "0" instead of an "o"
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 12 months ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
Your error has nothing to do with your FX, the error says there is no function named
Code Snippet
Plaintext
load_weapon_spec_fr0m_table
i have a feeling it is because in the word "from" there is a "0" instead of an "o"

Thanks for the reply. I eventually noticed that and fixed it. Weird, I don't know how that got changed. Anyways, I got everything working now, except I can't see the fx in game. I have Iprints showing me the relative difference in origin as a vector, that is between the player and the fx model.  I'll eventually figure it out or post a new help topic if I can't resolve it. Thanks again.

 
Loading ...