Enchanted Shaft (Slowfall)

Post » Fri May 27, 2011 6:48 pm

I thought I posted a topic on this subject when I first joined these forums, but I can't seem to find it. As a matter of fact, it seems a few or my topics have disappeared. Anyway, I am in need of a script that enchants a shaft with the 'slow fall' spell. When the player first enters the shaft from high above, he/she will float down to the bottom of the shaft and land in a room below (the slow fall spell will be cut off at the base of the shaft and the player will fall to the floor a few feet or so below). I remember that a reply from the other topic mentioned in order to do this, i'd have to set an area that the spell is affected by with some sort of activator or something. Does anyone knnow how to achieve this enchantment?
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Sat May 28, 2011 7:45 am

First, you need a Slowfall *curse* instead on a spell. Curses can be AddSpell/RemoveSpell'ed like regular spells but they directly *apply* to the object rather than get into the spell list. Then you get two invisible activators - one on the top of the shaft, one at the bottom. And one additional script is a global.

begin shaft_top_scriptif ( GetDistance Player <= 100 )	if ( Player->GetSpell "slowfall_curse" == 0 )		Player->AddSpell "slowfall_curse"		StartScript shaft_failsafe_script	endifendifend

begin shaft_bottom_scriptif ( GetDistance Player <= 100 )	if ( Player->GetSpell "slowfall_curse" == 1 )		Player->RemoveSpell "slowfall_curse"	endifendifend

begin shaft_failsafe_script; this is in case that player is a smarta$$ and *does* leave the cell with the spell turned on (for example, through Recall or Divine Intervention)if ( GetPCCell "your cell" == 1 )	returnendifif ( Player->GetSpell "slowfall_curse" == 1 )	Player->RemoveSpell "slowfall_curse"endifStopScript shaft_failsafe_scriptend

The position (and the distance) for a top activator better be selected so that it would apply the spell only when the player already starts falling and can't leave the room through the top door.
User avatar
Charlotte X
 
Posts: 3318
Joined: Thu Dec 07, 2006 2:53 am

Post » Fri May 27, 2011 7:09 pm

Ok. The top of the shaft doesn't have a door or anything. They're magically teleported to a small platform at the very top. Which invisible activators are available? I've never really looked into these to know what exists.
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Sat May 28, 2011 6:28 am

The fastest way will be to take any "Sound_*" activator (it has an "EditorMarker.nif" mesh), save it under a new name, and replace its script with yours.
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am


Return to III - Morrowind