How to automatize scripts?

Started by InCreator, Sat 19/06/2004 23:46:22

Previous topic - Next topic

InCreator

Like, I have some frequently used animations, such as picking something up or - to be more specific - one of character grabs his head and shakes it when other character does something stupid.
Now, I wish to know is there any possibilty to write needed commands somewhere once and declare own quick-function to remotely perform those actions, something like

GrabHead(EGO);
PickFromGround(EGO);

...or even without passed variables - beacuse they are not so badly needed, such as

Grabhead;
PickFromGround;

Or something as simple as that? Copy-pasteing needed commands will sink me into code - makes things really long and confusing.

Ashen

Couldn't you just create them as custom functions?
So, in the global script you'd have something like:

function GrabHead(); {
  SetCharacterView (EGO, GRABVIEW);
  AnimateCharacter (EGO, 0, 3, 0);
  SetCharacterView (EGO, NORMALVIEW);
}

Then in the Script Header:

import function GrabHead();

I've done something similar to automate NPC inventories.
I know what you're thinking ... Don't think that.

InCreator


SMF spam blocked by CleanTalk