View Single Post
Old 07-24-2013, 10:41 PM   #3
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 221
Current Game: Warframe, SC Blacklist, KOTOR1
I believe I heard that oldflash did this in his/her Final Touch mod, and from what I've looked at (though there are a lot of files to look through, and I'm not sure what all is going on with these scripts for sure), it seems that it spawns via an armband that runs this script:
Code:
// pc_remote.nss

void main() 
{
	object oPC = GetFirstPC();
	vector vPos = GetPosition(oPC);
	float fPCFace = GetFacing(oPC);
	location lLoc = Location(vPos + AngleToVector(fPCFace) * 1.5f, fPCFace);
	object oCurHide = GetItemInSlot( INVENTORY_SLOT_CARMOUR, oPC );
	if ( !GetIsObjectValid( oCurHide ) && !GetIsObjectValid(GetObjectByTag("pc_remote"))) {
		object oRemote = CreateObject(OBJECT_TYPE_CREATURE, "pc_remote", lLoc);
		SetNPCAIStyle(oRemote, 13);
		object oNewHide = CreateItemOnObject( "p_rem_chk", oPC, 1, TRUE );
		DelayCommand(0.1,ActionEquipItem( oNewHide, INVENTORY_SLOT_CARMOUR ));}
	else { if (GetIsObjectValid(GetObjectByTag("pc_remote"))) {
			DestroyObject(GetObjectByTag("pc_remote"), 0.0, TRUE); 
				if ( GetIsObjectValid( GetObjectByTag("p_rem_chk"))) {
				DelayCommand( 0.01, ActionUnequipItem( oCurHide ) );
				SetItemStackSize(GetObjectByTag("p_rem_chk"), 1);
				DelayCommand( 0.15, DestroyObject( GetObjectByTag("p_rem_chk"), 0.0f, FALSE, 0.0f, TRUE));} } }
}
And this is the heartbeat script used for "pc_remote.utc" (though that may not be the only one you'd want to look at):
Code:
// pc_remote.nss

void main() 
{
	object oPC = GetFirstPC();
	vector vPos = GetPosition(oPC);
	float fPCFace = GetFacing(oPC);
	location lLoc = Location(vPos + AngleToVector(fPCFace) * 1.5f, fPCFace);
	object oCurHide = GetItemInSlot( INVENTORY_SLOT_CARMOUR, oPC );
	if ( !GetIsObjectValid( oCurHide ) && !GetIsObjectValid(GetObjectByTag("pc_remote"))) {
		object oRemote = CreateObject(OBJECT_TYPE_CREATURE, "pc_remote", lLoc);
		SetNPCAIStyle(oRemote, 13);
		object oNewHide = CreateItemOnObject( "p_rem_chk", oPC, 1, TRUE );
		DelayCommand(0.1,ActionEquipItem( oNewHide, INVENTORY_SLOT_CARMOUR ));}
	else { if (GetIsObjectValid(GetObjectByTag("pc_remote"))) {
			DestroyObject(GetObjectByTag("pc_remote"), 0.0, TRUE); 
				if ( GetIsObjectValid( GetObjectByTag("p_rem_chk"))) {
				DelayCommand( 0.01, ActionUnequipItem( oCurHide ) );
				SetItemStackSize(GetObjectByTag("p_rem_chk"), 1);
				DelayCommand( 0.15, DestroyObject( GetObjectByTag("p_rem_chk"), 0.0f, FALSE, 0.0f, TRUE));} } }
}


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,