Editor: Tip for faked Decorations

Questions, Informations and Discussions
Post Reply
User avatar
£éè£å-(DOG)-
Full Game Admin
Full Game Admin
Posts: 643
Joined: Wed Jul 30, 2008 8:27 am
Location: Germany

Editor: Tip for faked Decorations

Post by £éè£å-(DOG)- »

I don't know if it's of some help, but I thought it can not harm to write it down.

Lets say, you want to have a decoration of, for example a pawn. Well, you will find nothing for it under the default decorations. This means, you have to fake it. Lets say for example a nice Skaarj statue.
You could of course use a Skaarj pawn for it, but sometimes a simple decoration is more handy.

First of all you'll need a default decoration which already has nearly the properties needed. One very important point, the deco you want to use may have NO own animations.
A Knife for example is a very good choice, but there are of course others which would work as well.
So what to do? Here an example with a SkaarjTrooper:

1) add the knife to your map

2) look under ScriptedPawns for the SkaarjTroopers; it nearly doesn't matter which one you take, only thing you need is the Mesh info under Display, and they use all the same

3) open the Mesh Viewer and find the needed mesh in the list; it's sktrooper

4) open the properties of the added knife and change it's mesh to the Skaarj mesh

Nice, you may say now. "I have a knife in my map which looks like a SkaarjTrooper. But it looks like a boring normal Skaarj which I also could add as a normal pawn. But I don't want a normal Skaarj, I want a nice looking statue of a Skaarj." Well, don't worry, we're not ready. There are still things to do.

The Skaarj you see shows the default animation, Fighter. And it shows you the first frame of it. Lets say, you want a Skaarj statue which holds a shield. Open again the Mesh Viewer and select sktrooper under Mesh.

Below it you see a list with all animations for sktrooper. At the bottom of that list you find Shield. Open the properties of your knife-Skaarj and under Display enter Shield in the AnimSequence field.

"Hm, I have again a boring standing Skaarj there, but he's not holding a shield." you might say now.

Under the list you see the amount of frames for the Shield animation. It says 28. You can play the anim or go through it frame by frame.
Go through it now by clicking on the right arrow and choose the frame with the number 15 for example.

"Oh nice, but how can I use this single frame for my knife-Skaarj?"

Well, I was asking myself the same and finally found the answer to it.
Open again the properties of your knife-Skaarj and extend Display. Under AnimSequence you've already entered Shield. Now we need AnimFrame, which you find above it. Here you can enter a value between 0.0 and 1.0.

"Cool, but how do I know which value I must enter here to get Frame number 15?"

Answer: with a little calculation ;) :D
We have 28 frames here in total. You need to take 1 as base. Do this:

(1/28) * 15
and you'll get this: 0.53571428571428571428571428571429 (with the Windows calculator :lol: )

What we need are the six digits on the left side: 0.535714

Enter this value under AnimFrame and you'll get the anim with the Frame number 15. :D

Now a little more to do. First activate in the 2D views Radii View. In the properties of your knife-Skaarj set everything under Collision to True.
With the help of the 2D views adjust the CollisionHeight and CollisionRadius for your knife-Skaarj. Maybe you first want to alter the DrawScale of your statue, or just leave it to 1.
And of course give it the texture you like.

If you want your statue also to be pushable, make sure to set it under Decoration. And under Advanced make sure bStatic is set to False.
If you also want a shootable statue, just use a Monk or Nali statue instead of the Knife.

But don't forget:

Never use a Decoration which has its own Animations

Sorry, that it has become so long, but maybe it's of some use. You can do lots of cool stuff with it and use every anim Frame you like. This was of course only a simple example with a Skaarj, there are much more possibilities.
Post Reply