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:
53
_module/nss/jw_bs2ss_tr_oc.nss
Normal file
53
_module/nss/jw_bs2ss_tr_oc.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
//Get the PC that just clicked on the transition
|
||||
object oClicker = GetEnteringObject();
|
||||
//Get the location of the PC
|
||||
location lLeave = GetLocation( oClicker );
|
||||
//Get the PC's postion
|
||||
vector vLeave = GetPositionFromLocation( lLeave );
|
||||
//The Trigger that's in the destination area
|
||||
|
||||
|
||||
object oTran = GetObjectByTag( "jw_ss2bs_tr" );
|
||||
//Get the destination area
|
||||
object oDestArea = GetArea( oTran );
|
||||
|
||||
|
||||
|
||||
// get the vector of the entering waypoint.
|
||||
|
||||
location lWPleave = GetLocation( GetObjectByTag("jw_bs2ss_wp") );
|
||||
vector vWPleave = GetPositionFromLocation( lWPleave );
|
||||
|
||||
|
||||
|
||||
///get the PC's vector when compared to the leaving WP.
|
||||
vector vDifference = vWPleave-vLeave;
|
||||
|
||||
// get the location of the waypoint to go to
|
||||
|
||||
location lWPenter = GetLocation( GetObjectByTag("jw_ss2bs_wp") );
|
||||
|
||||
|
||||
/// get the vector of the spawnpoint to go to:
|
||||
|
||||
vector vWPenter = GetPositionFromLocation( lWPenter );
|
||||
|
||||
/// add in the difference
|
||||
|
||||
vector vFinal= vWPenter-vDifference;
|
||||
|
||||
|
||||
|
||||
//Get the PC's facing
|
||||
float fFacing = GetFacingFromLocation( lLeave );
|
||||
//Create a new Location to place the PC in
|
||||
location locNew = Location( oDestArea, vFinal, fFacing );
|
||||
//Clear all PC actions, (Stop walking) and then jump
|
||||
//to the new location.
|
||||
AssignCommand( oClicker, ClearAllActions() );
|
||||
AssignCommand( oClicker, JumpToLocation( locNew ) );
|
||||
}
|
||||
Reference in New Issue
Block a user