PDA

View Full Version : Actors and Structures



pgantt
02-19-2008, 10:33 PM
On the game version of knightfall you are able to have an animation on the gate to the dragon but you are not able to walk through it. My problem that I am having is that I am not able to have an animation on a structure because they are there to not move. When I exort something as an actor I can walk through it.

Is there some sort of scripting that i am able to do so i cannot walk through and actor. Or is there a different way to make a structure have an animation.

If this option is avaliable only on the purchased version, where would i be able to go to and buy the program?

KenMaffei
02-22-2008, 11:58 PM
The gate is a little tricky, and here's how it works. First, there is a command for actors that can make them behave like structures. The command is:

makestructure

You will find it in the Script Reference. However, note that the gate (also called the portcullis) is not a solid object. This presents some problems in that the knight's pivot point can simply sneak through the gate where there is no geometry. So even if it behaved like a structure, there is not enough solid geometry to block the knight. In Knightfall we have built a solid, invisible actor called the portcullis block. It's pretty much just a solid plane. You'll see it in the actors directory. Look in its script file and you will see the script command:

makestructure actors true

which means to make this actor behave like a structure. The word "actors" after makestructure tells Igntion to only make this act like a structure for collisions with actors, not with the camera. The other variants are

makestructure camera true
makestructure both true

Anyway, the portcullis block now acts like a structure for the knight. The other line in the portcullis block script is

onanimationend "portcullis block raise" makestructure false

If you look through the "bell and handle" script, which controls the portcullis animation, you will see that when the portcullis goes up, so does the invisible blocker. That animation is called "portcullis block raise". The script command above turns off the structure behavior for the invisible block and the knight can then go through.

In summary:
1. An invisible planar blocker covers the gate. It's exported as an actor.
2. The blocker is animated when the gate is animated to move out of the way.
3. The blocker has structure behavior enabled via its script.
4. The structure behavior is turned off when the blocker's animation is completed, allowing the knight to get through.

--KM