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

Animated Barkin Doggos (Prefab help!)

broken avatar :(
Created 6 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
2,516 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
So i need help with this Prefab! Im using these dogs for scenery in my map.

I do everthing it says but i end up with a bad syntax error...and i removed everything that i did to make sure it was this prefab and surely enough the map worked fine when i removed all the barkin dog stuff...

GSC Code in the prefab:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_music;
#include maps\_anim;
#include animscripts\shared;
#include animscripts\utility;
#using_animtree( "dog" );
//////////////////
//in mapname.gsc
//maps\_zombiemode::main();
//thread maps\animated_dogs::setup_animated_barking_dogs();
///////////////////
//add to mod.csv
/*
xanim,german_shepherd_sleeping
xanim,german_shepherd_eating_loop
xanim,german_shepherd_attackidle_bark
xanim,german_shepherd_idle
*/
//

setup_animated_barking_dogs()
{
animated_barking_dogs = GetEntarray( "animated_barking_dogs", "targetname" );
array_thread( animated_barking_dogs, ::set_anim_playback_rate_dogs );
}
set_anim_playback_rate_dogs()
{
self useAnimTree( #animtree );
self endon("killanimscript");
self.animplaybackrate = 0.9 + randomfloat( 0.2 );
self.moveplaybackrate = 1;
self clearanim(%german_shepherd_attackidle_knob, 0.1);
while (1)
{
self attackidle_bark();
self animscripts\shared::DoNoteTracks("done");
}
}
attackidle_bark()
{
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_idle" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_idle, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_sleeping" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_sleeping, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_eating_loop" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_eating_loop, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_attackidle_bark" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_attackidle_bark, 1, 0.2, self.animplaybackrate );
}
}

So i added #Include and the #Using anim tree to my Utilities tab in mymapname.gsc and when i added all this stuff i got a bad syntax error. I am not sure what the problem is. The code at the bottom is not the issue either! It's only the #Include and #Using_animtree stuff that is causing issues...it's required in order for this to work! But for some reason it gives me a bad syntax!
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 5 days ago
Posts
645
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
No code is bug free
Signature
My published cod maps:

Subzero
Djinncaves
Enclosed (a.k.a baconcube)
Bayern
Snowblind
Furtrelock

Black Ops Perks: https://www.ugx-mods.com/forum/scripts/55/call-of-duty-world-at-war-black-ops-perks/22180/
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
gympie6's Contact & Social LinksTheRevenantSkullTeffrieTeffrieGympie5#5971
So i need help with this Prefab! Im using these dogs for scenery in my map.

I do everthing it says but i end up with a bad syntax error...and i removed everything that i did to make sure it was this prefab and surely enough the map worked fine when i removed all the barkin dog stuff...

GSC Code in the prefab:
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_music;
#include maps\_anim;
#include animscripts\shared;
#include animscripts\utility;
#using_animtree( "dog" );
//////////////////
//in mapname.gsc
//maps\_zombiemode::main();
//thread maps\animated_dogs::setup_animated_barking_dogs();
///////////////////
//add to mod.csv
/*
xanim,german_shepherd_sleeping
xanim,german_shepherd_eating_loop
xanim,german_shepherd_attackidle_bark
xanim,german_shepherd_idle
*/
//

setup_animated_barking_dogs()
{
animated_barking_dogs = GetEntarray( "animated_barking_dogs", "targetname" );
array_thread( animated_barking_dogs, ::set_anim_playback_rate_dogs );
}
set_anim_playback_rate_dogs()
{
self useAnimTree( #animtree );
self endon("killanimscript");
self.animplaybackrate = 0.9 + randomfloat( 0.2 );
self.moveplaybackrate = 1;
self clearanim(%german_shepherd_attackidle_knob, 0.1);
while (1)
{
self attackidle_bark();
self animscripts\shared::DoNoteTracks("done");
}
}
attackidle_bark()
{
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_idle" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_idle, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_sleeping" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_sleeping, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_eating_loop" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_eating_loop, 1, 0.2, self.animplaybackrate );
}
if( isdefined( self.script_noteworthy ) && self.script_noteworthy == "german_shepherd_attackidle_bark" )
{
self setflaggedanimrestart( "dog_idle", %german_shepherd_attackidle_bark, 1, 0.2, self.animplaybackrate );
}
}

So i added #Include and the #Using anim tree to my Utilities tab in mymapname.gsc and when i added all this stuff i got a bad syntax error. I am not sure what the problem is. The code at the bottom is not the issue either! It's only the #Include and #Using_animtree stuff that is causing issues...it's required in order for this to work! But for some reason it gives me a bad syntax!

Have you tried running the map with developer 1?
Most of the time it tells you what is wrong.
If that is not going to help you plz send me the link to the tutorial and I will take a look for you. :)
Marked as best answer by Deleted User 6 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +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 LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Quote
So i added #Include and the #Using anim tree to my Utilities tab in mymapname.gsc

Not sure what you mean with that, but the instuctions say all you should add in your mapname.gsc is this line:
Code Snippet
Plaintext
thread maps\animated_dogs::setup_animated_barking_dogs();

And add that right under the existing line:
Code Snippet
Plaintext
maps\_zombiemode::main();


That's all you should do for 'scripting'
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 19 March 2018
Last active: 6 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Salem
×
Haaagaibmsirirla's Contact & Social Links
barking doggos lol
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Not sure what you mean with that, but the instuctions say all you should add in your mapname.gsc is this line:
Code Snippet
Plaintext
thread maps\animated_dogs::setup_animated_barking_dogs();

And add that right under the existing line:
Code Snippet
Plaintext
maps\_zombiemode::main();


That's all you should do for 'scripting'

OK SO I FOUND THE PROBLEM :D So apparently there was a typo...i apologize for wasting anyone's time on this.

 
Loading ...