Master Orran Posted October 22, 2006 Share Posted October 22, 2006 how would i edit the bet3m4 script that start on 001EBO so that you are HK-47? i think the script is .ncs format so i cant see how to edit it and i cant get the de-ncs compiler to work. thank -Master O Link to comment Share on other sites More sharing options...
stoffe Posted October 22, 2006 Share Posted October 22, 2006 how would i edit the bet3m4 script that start on 001EBO so that you are HK-47? The script looks something like: // ST: a_bet3m4.nss (001EBO_s.rim) void Rumble(); void PossessT3M4(); void DisarmNPC(object oTarget, int bDestroy); void main() { if (GetLoadFromSaveGame()) return; if (GetIsPC(GetEnteringObject())) { if (!GetLocalBoolean(OBJECT_SELF, 30)) { SetLocalBoolean(OBJECT_SELF, 30, TRUE); Rumble(); RevealMap(); } if (GetGlobalNumber("002EBO_Door_Override")) { object oDoor = GetObjectByTag("star_dorm"); AssignCommand(oDoor, ActionOpenDoor(oDoor)); } int nBeenT3 = GetGlobalNumber("001EBO_BEEN_T3_M4"); if (!nBeenT3) { if (GENDER_MALE == GetGender(GetFirstPC())) SetGlobalBoolean( "000_PLAYER_GENDER", TRUE); SetGlobalNumber("001EBO_BEEN_T3_M4", 1); DelayCommand(0.2, PossessT3M4()); object oExile = GetObjectByTag("MEDBAY_PC"); if (!GetIsObjectValid(oExile)) { object oMarker = GetObjectByTag( "InvisibleLocationMarker"); location lBed = GetLocation(oMarker); oExile = CreateObject(OBJECT_TYPE_CREATURE, "c_medbaypc", lBed); int nLooks = GetAppearanceType(GetEnteringObject()); effect eLooks = EffectDisguise(nLooks); ApplyEffectToObject( DURATION_TYPE_PERMANENT, eLooks, oExile); AssignCommand(oExile, ActionPlayAnimation( ANIMATION_LOOPING_DEAD_PRONE, 1.0, -1.0 )); } } SetGlobalNumber("GBL_MAIN_SITH_LORD", 0); if (GetGlobalNumber("001EBO_Movie") == 0) { SetGlobalNumber("001EBO_Movie", 1); PlayMovie("permov01"); SetGlobalFadeOut(); SetFadeUntilScript(); AssignCommand(GetObjectByTag("Prologue"), ActionStartConversation(OBJECT_SELF, "intro")); } } } void Rumble() { if (GetGlobalNumber("001EBO_Rumble") == 0) { DelayCommand(IntToFloat(Random(10) + 10), Rumble()); AurPostString("Rumbling", 5, 5, 5.0); PlaySound("MetalStrain"); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_SCREEN_SHAKE), GetFirstPC(), IntToFloat(Random(8) + 1)); } } void PossessT3M4() { AddAvailableNPCByTemplate(NPC_T3_M4, "p_t3m4"); SwitchPlayerCharacter(NPC_T3_M4); DisarmNPC(GetObjectByTag("t3m4"), TRUE); SetMinOneHP(GetObjectByTag("t3m4"), TRUE); AssignCommand(GetObjectByTag("debris"), ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(25), GetObjectByTag("t3m4") )); DisableHealthRegen(TRUE); ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELECTRICAL_SPARK), GetObjectByTag("t3m4")); } void DisarmNPC(object oTarget, int bDestroy) { object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oTarget); AssignCommand(oTarget, ActionUnequipItem(oWeapon, TRUE)); if (bDestroy) DestroyObject(oWeapon, 0.0, TRUE, 0.0, TRUE); } As can be seen, the character you switch to is set in the PossessT3M4() function, which adds T3 to the player party and puts the player in control of it. Link to comment Share on other sites More sharing options...
Master Orran Posted October 22, 2006 Author Share Posted October 22, 2006 thanks stoffe, so i just change possessT3m4() to possessHK47()? Link to comment Share on other sites More sharing options...
Darkkender Posted October 23, 2006 Share Posted October 23, 2006 Actually you need to edit the function not the function name. void PossessT3M4() { AddAvailableNPCByTemplate(NPC_T3_M4, "p_t3m4"); SwitchPlayerCharacter(NPC_T3_M4); DisarmNPC(GetObjectByTag("t3m4"), TRUE); SetMinOneHP(GetObjectByTag("t3m4"), TRUE); AssignCommand(GetObjectByTag("debris"), ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(25), GetObjectByTag("t3m4") )); DisableHealthRegen(TRUE); ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELECTRICAL_SPARK), GetObjectByTag("t3m4")); } So the function can stay the same but just change it to look like this: void PossessT3M4() { AddAvailableNPCByTemplate(NPC_HK_47, "p_hk47"); SwitchPlayerCharacter(NPC_HK_47); DisarmNPC(GetObjectByTag("hk47"), TRUE); SetMinOneHP(GetObjectByTag("hk47"), TRUE); AssignCommand(GetObjectByTag("debris"), ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(25), GetObjectByTag("hk47") )); DisableHealthRegen(TRUE); ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELECTRICAL_SPARK), GetObjectByTag("hk47")); } You'll want to confirm that HK-47's NPC ID is "NPC_HK_47" and not something else. Also double check that HK's Tag is "hk47" and not something else. Last but not least confirm that hk's template is "p_hk47". If all of those are correct then compile it with the hk's utc file in your compile folder and your set. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.