Linking, Hiding & Swapping Entities AND THE OPEN NODE.


HIdden or not hidden
HIDDEN=
[0,1]
To Hide and unhide models, use the hidden command.

Newscript
On first -cmd node put
newent=ob_automap;hidden=0

at 2.0 put a -cmd node
hidden=1

at 3.0 put a -cmd node
hidden=0

Linking to an existing entity
LINKENT=
[sequence number of entity, OR PlayerChar(0-2,X), open focus(0,1), focus cubic path]
Lets say you want to use an existing model IN the level for a script. You can LINK to that model. The model MUST HAVE A SEQUENCE NUMBER on it already.

To check, go up to a model and put the 3d cursor on it. If debug is set to ‘1’ you should see a sequence number in text on the screen. Sequence numbers are givin to entities through a map editor or Nox drop. …See AnachroRadiant for more information . Now WHY would you want to use a model that exists in a level, you ask?
When a script ends, ALL NEWENT entities will disappear. They are Spawned by planet and the script, so when the script ends the entities disappear. A LINKED entity will NOT disappear.
NOTE: THOSE entities will REMEMBER what animation state you left them in so be SURE to ANIMCLEAR them, and remove sounds attached to them.

What’s great about the anox scriptor is once the script ends the camera returns behind the main character (usually Boots), which makes the cines and gameplay seamless with no cuts.

Newscript
Goto a map with npcs. (Non Player Characters)
Like tenements or any other map.
Find an npc
If you are in planet, bring down console and type
Forcecursormode 3
This will bring up the 3d cursor, put it on the npc. The sequence number, and the name of the entity will be displayed. Usually something like npc_hma has sequence number 13:2401.
Fix your cursor by bringing down the console and typing
Forcecursormode 0
Drop a 3d node somewhere in the level, with a camera looking at it.
Drop a -cmd node at 0:0
Linkent=13:2401;floor=1
(I just used 13:2401 as an example; you can use the number from the entity you are looking at).
Play the script. That's the person you choose.
STOP the script, notice the npc will still be in that exact position. But will now probably go wander off (IF they were a wandering npc that is).
You can animate that npc if you wish, by adding more -cmd nodes and making the entity do what you want. This is a great way of grabbing an enitity that extist in a map and making it do what you want when the planet script is executed(do a little dance, make a little love, get down tonight).
Don’t know what the animations are for the enitity?
Use:
dumpaniminfo models\npcs\modelname.md2

You may have to look up the proper path in the entity.dat located in the anoxdata\models dir.

Take a breather (I know I need one), cause you are about to learn about the OPEN NODE

THE OPEN NODE
Make a new script.
Have the director point to cubic 1
Drop 1 single node in 3d space
Now Click on that node and DRAG it out to 5.0 secs.

You’ve just made an open node. Now move some ways away from that node in 3d space.
Play this. The first node at 0:0 is technically the current position you were in when you pressed play, and then it took 5 seconds to get to that point.
Now make a cameral path 1 to focus on cubic path 2. and drop a node. Drag that node on the timeline to 2.0 secs. Move away from these nodes and play the script again.
You’ll notice that the camera took 2 seconds to find the focus, and then at 5 seconds reached the camera node. An OPEN FOCUS at 2.0 and an OPEN NODE at 5.0
You can even have an OPEN ROLL. Give cubic 1 some roll and drag that node out.

What is the point of all this?

If you’ve played Anox, you might have noticed in battle that the camera never cuts away when a battle script begins, it zooms into the player. Some cinematics also start without a cut but a nice smooth camera move in. These are all done with OPEN CAMERA NODES, OPEN FOCUS NODES, OPEN ROLL NODES.

This idea of OPEN NODES can also be applied to MODELS!!!!

Load up map rowdys.
Do the cursor trick, to find out the sequence number for rowdy himself.
Newscript
Drop a 3D node somewhere in his little area (on cubic 1). Drag that node to 3.0 secs.
Now remember linkent?
Have the first cmd node read
Linkent=5:????jake,1,2;floor=1
Play the script using F7. and watch rowdy move to that point. It takes him 3 seconds.
The 2 numbers after his sequence number in the command line are very IMPORTANT!
That first number determines if that entity if that entity is going to USE that OPEN NODE or it might think it is a closed node. If any model is going to be using open node, put a ‘1’, otherwise just don’t put ANY numbers at all. That second number (the ‘2’) is the focus path he is looking at. He might not have one, so drop a focus node on CUBIC PATH 2. Drag that node out to 1.0 secs. This means that you are essentially telling this model in 2 different ways to be looking at path 2, it’s weird, but it works.

If a model is on path 3 looking at path 5 for some reason, the line would read:
Linkent=5:????jake,1,5;floor=1

Play the script. Does rowdy do some weird jig as he walk to his node? This might be because he is drifting towards that point sideways. This takes some time to get an understanding, you need to put an open focus node(at 0.3 secs) very close to the open position node and drop another focus node (at 3.0) further away from the position node. This will smooth out his walk over to that node.

You can ALSO grab PlayerCharacters.

ELEVATOR SCRIPTS AND PLAYERCHAR0,1,2
The people….they Love the elevator script. Actually they don’t. well thass okay, because I did so many of them, that finding love for them for me was hard too. I digress.

For elevator script, you may not KNOW who exactly is in the party. So you can link the party leader, secondary member and third member without caring who it is specifically.
Using PlayerChar0
The ‘P’ and the ‘C’ MUST BE CAPITALIZED!!!
0 = party leader
1 = 2nd member
2 = 3rd member
(isn’t that great?)

AND since most elevator script were all open nodes the commands looked like this

Linkent=PlayerChar0,1,2;floor=1
Linkent=PlayerChar1,1,2;floor=1
Linkent=PlayerChar2,1,2;floor=1

NOTE: Planet thinks that the camera IS BOOTS (essentially PlayerChar0), so you might notice weird things happening when you use this. SO you may wanna script with a COPY of boots.
YOU CAN COMMENT OUT COMMANDS USING ‘#”
So at cmd node at 0:0
linkent=PlayerChar0,1,2;floor=1
and at 0.1
newent=character_boots;floor=1

and when you are finished just delete the ‘#’ from node 0.0 and put one in at 0.1

I’ll get to PlayerCharX in a second.

Easy Linking
LINKCLASS=
[entity.dat classname, open focus(0,1), focus cubic path]
Maybe you don’t want to use a sequence number to grab an ent, maybe you want to use a classname (entity.dat classname), like ob_automap.

Very simply use
Linkclass=ob_automap;floor=0

BUT, understand that there can ONLY BE ONE of those classes in the map, otherwise it won’t know which automap to grab if there are multiple ones.

like Boots and Co. you can of course use

Linkclass=character_boots;floor=1
Linkclass=character_boots,1,2;floor=1

NOTE: again Planet thinks that the camera is Boots, so you may have to work with a copy for scripting and change it back when you are done.

Perhaps, there is a scene specifically with Boots, but you don’t know who the other party member are (Like in the hephtower scenes). You can use PlayerCharX.

It will grab the remaining party member and put them on a path.

So THE CMDS on cubic path 1,3 & 5 would look something like this

Linkclass=character_boots,1,2;floor=1
Linkent=PlayerCharX,1,4;floor=1
Linkent=PlayerCharX,1,6;floor=1

What will be very helpful to you is to look at the many elevator scripts (if you can stomach it) in the bricks. Tenements_elevator1bottom, Tenements_elevator1top.

SWAPMDL=[modelpathname]

See chapter 35 on chain cines
JAKE???


SWAPMDL=[model path, [permanent(optional)]