Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
27
_module/nss/tri_dooruse.nss
Normal file
27
_module/nss/tri_dooruse.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//originally: trapdoor_use script by Kerico 7/5/02
|
||||
//edited by: Trito for placeable doors 1/6/03
|
||||
//place in door on-use scipt
|
||||
//opens the door, plays animation, teleports player, closes door
|
||||
|
||||
void main()
|
||||
{
|
||||
//Get PC
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
//Get Door
|
||||
object oDoor = GetObjectByTag("tri_dwarfdoor1");
|
||||
|
||||
//have the PC act as if opening the door
|
||||
AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 0.7));
|
||||
//swing the door to open after a slight delay to allow for the PC's animation
|
||||
DelayCommand(1.0,ActionPlayAnimation(ANIMATION_PLACEABLE_OPEN));
|
||||
//get the target waypoint destination
|
||||
object oDrop = GetWaypointByTag("WP_tri_insidedwarf1");
|
||||
//clear all actions
|
||||
DelayCommand(1.3,AssignCommand (oPC,ClearAllActions()));
|
||||
//jump the PC to the destination
|
||||
DelayCommand(1.4,AssignCommand (oPC,JumpToObject(oDrop)));
|
||||
//close the door
|
||||
DelayCommand(1.5,ActionPlayAnimation(ANIMATION_PLACEABLE_CLOSE));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user