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

Xmodel with Anim in Game

broken avatar :(
Created 10 years ago
by MrDunlop4
0 Members and 1 Guest are viewing this topic.
1,889 views
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 12 months ago
Posts
949
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
Signature
Maya <3

Let's Play some osu!
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksNelielexy0Nelielexy0CSMrDunlop4NelieleyNelielexy0Nelielexy0
Hey Guys :)

How can i do a Model with animations? Can anyone help mee?

THX

MrDunlop4
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Making your OWN anims will take a serious amount of learning

Exporting anims from other call of dutys to go with the models can be done with Tom Cowleys tools (think i got his name right?)
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 12 months ago
Posts
949
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksNelielexy0Nelielexy0CSMrDunlop4NelieleyNelielexy0Nelielexy0
Making your OWN anims will take a serious amount of learning

Exporting anims from other call of dutys to go with the models can be done with Tom Cowleys tools (think i got his name right?)
Hey
Ive got my model and the animations. But i want the model with animations in my Map. Exp. A Flag

MrDunlop4
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
There's a few things you would need to do to make that happen, would be good to have some basic knowledge of setting up a simple script. because i'm sure i'll forget one or two 'basic' steps..

1.
First of all, obv place the model in your map as a script_model and give it a targetname. I'm gonna use

Code Snippet
Plaintext
flag_mdl - targetname

in this example.



2.
A model that plays an animation needs an animtree. Pretty easy to make one, just create the folder:

Code Snippet
Plaintext
animtrees

in your mods\mapname\ folder.
In there make a new tekst-file and name it anything, but give it the extension .atr. I'm gonna use:

Code Snippet
Plaintext
flag_anims.atr


Now open that file, and just paste the name of the xanim in it (and nothing else), and save it.


3.

You need to add the xanim, and animtree to your MOD.csv. Like this:

Code Snippet
Plaintext
xanim,NAME_OF_THE_ANIM_FILE
rawfile,animtrees/flag_anims.atr


4.
Now the script that plays the anim, make a new .gsc in your mods\mapname\maps\ folder. Name it whatever you like.
Open it, and paste this in it: Also replace the "NAME_OF_THE_ANIM_FILE" with the actual name of the anim you using

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

#using_animtree( "flag_anims" );            // here you put the animtree you made

main()
{
flags = getentarray( "flag_mdl", "targetname" );
        array_thread(flags,::play_flag_anims);
}

play_flag_anims()
{
self UseAnimTree(#animtree); // here we tell the model wich animtree to use

while(1)
{
self animscripted( "flag_idle", self.origin, self.angles, %NAME_OF_THE_ANIM_FILE ); // this plays the anim
self waittill( "flag_idle", end ); // wait for the end of the anim
self clearanim( %NAME_OF_THE_ANIM_FILE, 0 ); // clear the anim, so it can play again
}
}



5.

Now all thats left is to call this script from your mapname.gsc, under the line

Code Snippet
Plaintext
maps\_zombiemode::main();


add this line:

Code Snippet
Plaintext
maps\NAME_OF_THE_GSC_YOU_MADE::main();


6.
Compile, and dont forget to click the new file's in your MOD-builder



I assumed you have an animation you want to play over and over, so this script runs in a loop. There's prob other ( and better )  ways to play an animation in a loop. There's quite a few functions to use for anims. However this works too  ;D
Last Edit: October 06, 2014, 10:38:26 am by BluntStuffy

 
Loading ...