UGX-Mods

Call of Duty 5: World at War => Help Desk => Topic started by: wthout on April 04, 2017, 02:51:08 pm

Title: Help with ugx easy fx
Post by: wthout on April 04, 2017, 02:51:08 pm
Now I feel real stupid for this, but  I've watched many videos and followed the tutorial completely but whenever I try to test out my map with the script_struct placed in, I build the mod, compile it, and whatever. But I go into waw, start  up my map and get an error that says like something is wrong  on line 265 of the ugx_easy_fx.gsc file
although I copied it completely from the tutorial.

Heres line 265: PlayFxOnTag( level._effect[fx], self.fx, fxTag );

Error: error: unexpected end of file found (file: maps/ugx_easy_fx.gsc line 265)
          PlayFxOnTag( level._effect[fx], self.fx, fxTag );

Could someone attempt to help me? It's probably just me being stupid but I can't figure it out for my life.
Title: Re: Help with ugx easy fx
Post by: Scobalula on April 04, 2017, 07:15:57 pm
It's possible when copying you didn't copy the end:

Code Snippet
Plaintext
triggered_use_fx(loop) //These are triggered FX. They are triggered when the player uses a trigger (by pressing F) that you create in Radiant.
{
trigger = getEnt(self.target,"targetname");
if(!isDefined(trigger.script_string))
trigger.script_string = "SET THIS TEXT USING THE SCRIPT_STRING KVP ON THE TRIGGER";
trigger setHintString(trigger.script_string);
trigger SetCursorHint("HINT_NOICON");
fx = self.script_noteworthy;
trigger waittill("trigger");

fxTag = "tag_origin";
    self.fx = Spawn( "script_model", self.origin );
    self.fx SetModel( "tag_origin" );
    self.fx.angles = self.angles;
    self.fx.origin = self.origin;
    self.fx LinkTo( self, fxTag );

if(isDefined(loop))
{
if(!isDefined(self.speed))
{
self.speed = 0.5;
if(isDefined(level.fx_debug))iPrintLn("Easy-FX: ^1ERROR: ^7No speed was specified on the struct at origin "+self.origin+". It has defaulted to 0.5 seconds");
}
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
}
else
PlayFxOnTag( level._effect[fx], self.fx, fxTag ); // Line 265
}

Check that the last curly bracket is there in your GSC under line 265.
Title: Re: Help with ugx easy fx
Post by: wthout on April 04, 2017, 08:33:46 pm
It's possible when copying you didn't copy the end:

Code Snippet
Plaintext
triggered_use_fx(loop) //These are triggered FX. They are triggered when the player uses a trigger (by pressing F) that you create in Radiant.
{
trigger = getEnt(self.target,"targetname");
if(!isDefined(trigger.script_string))
trigger.script_string = "SET THIS TEXT USING THE SCRIPT_STRING KVP ON THE TRIGGER";
trigger setHintString(trigger.script_string);
trigger SetCursorHint("HINT_NOICON");
fx = self.script_noteworthy;
trigger waittill("trigger");

fxTag = "tag_origin";
    self.fx = Spawn( "script_model", self.origin );
    self.fx SetModel( "tag_origin" );
    self.fx.angles = self.angles;
    self.fx.origin = self.origin;
    self.fx LinkTo( self, fxTag );

if(isDefined(loop))
{
if(!isDefined(self.speed))
{
self.speed = 0.5;
if(isDefined(level.fx_debug))iPrintLn("Easy-FX: ^1ERROR: ^7No speed was specified on the struct at origin "+self.origin+". It has defaulted to 0.5 seconds");
}
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
}
else
PlayFxOnTag( level._effect[fx], self.fx, fxTag ); // Line 265
}

Check that the last curly bracket is there in your GSC under line 265.

I don't think that's the issue, i just pasted that in there but before I already had the curly bracket at the end, I'll try again but I believe that isn't the problem

Double Post Merge: April 04, 2017, 08:44:43 pm
Well i'm no longer getting that issue
but now it's saying
"Could not find script maps/ugx_easy_fx"
Title: Re: Help with ugx easy fx
Post by: Scobalula on April 05, 2017, 12:27:40 pm
I don't think that's the issue, i just pasted that in there but before I already had the curly bracket at the end, I'll try again but I believe that isn't the problem

Double Post Merge: April 04, 2017, 08:44:43 pm
Well i'm no longer getting that issue
but now it's saying
"Could not find script maps/ugx_easy_fx"

That's probably WaW being WaW, it will do that a lot, especially if you're constantly loading the map (which will be a lot when in dev stage).

Can you upload the GSC you have? It's a little hard to help off info you've given. :P