I was tired of copying image files to my mod image folder while working in Asset Manager with Materials. Therefor i created this little tool(It's made in c#) that does everything for you
It simply copies an .iwi file that you have edited to the desired mod folder.
4 Functions for managing Animations on a script_model.
When using this script it's expected you already have the following things: - xmodel with bones. - xanim that can be played on the xmodel. - animtree that contains the xanims that can be played on the xmodel. - All of these (xmodel, xanim and animtree) should be included in your mod.
Documentation
Spoiler: click to open...
play_anim_looped
@Name: play_anim_looped
@Summary: An looped animation will be played on an entity. That's currently not playing a animation.
@CalledOn: <entity>: A script_model with bones.
@MandatoryArg: <anim>: The animation that should be played(This name should be in your Animtree).
@Summary: An entity that's currently playing a one time animation will be stopped.
@CalledOn: <entity>: A script_model with bones that is currently playing a one time animation.
@Example: xmodelEntity stop_anim_once();
Setup
1) Download the script: https://mega.nz/#!rEcXxIRL!Hlzq9LDFxY27vo5QzhS-upvwReL0x08SKo8eJfqIsv8 2) Copy the script to MODNAME/maps/_easyAnimation.gsc 3) Open MODNAME/maps/_easyAnimation.gsc you just pasted, and go to line 5. Change ANIMTREE to the animtree your are using 4) You can change the other settings if you want they are one line 12, 14 and 16. 5) Don't forget to include it in your launcher!, make sure you checked the script like this:
Spoiler: click to open...
Usage 1) Include _easyAnimation.gsc in your script, after that define your animtree again.
Example Script
Important
It doesn't matter wether your xanim is looped or not in asset manager it only plays once when play_anim_once is used.
Animation that are not looped in asset manager don't loop when play_anim_looped is used...
Having problems with including your xanim / animtree? Read this!
Spoiler: click to open...
Follow the following steps.
In asset manager export the XANIM with the following settings:
Use Bones = true
Type = Relative
Looping = true / false (depends on what you want)
Create / modify an existing animtree
Go to raw/animtrees and create/modify the desired animtree and add your xanim to it.
in your mod.csv add the created animtree and xanim. The XANIM must be included before the animtree! else it wont work...
xanim,XANIMNAME
rawfile,animtrees/ANIMTREENAME.atr
I hope this will help some people! If you use this script don't forget to add me to the credits
I have created a Default Map with the UGX script placer 2.0.1. After that i only changed the materials of the wall to concrete and added a sun. I did not move anything.
When i compile my map no errors show up and everything goes fine. But my map looks like this ingame:
My name is Jeroen and i'm from the netherlands. I started with modding 3 years ago or something. I really love making mods for call of duty and i'm soo hyped for bo3 mod tools (if they ever release it). I'm not that good at making maps because i don't have the patience , i like the scripting part more .
In irl i work for a company that creates web applications.