ace92 Posted July 31, 2008 Share Posted July 31, 2008 i've wrote a force power and here is the script: void main() { int iIdx; effect eDisguise = EffectDisguise(671); effect eLink1 = EffectAbilityIncrease(ABILITY_STRENGTH, 75); eLink1 = EffectLinkEffects(eLink1, EffectBlasterDeflectionIncrease(100)); eLink1 = EffectLinkEffects(eLink1, EffectAttackIncrease(3)); object oParty = GetPartyMemberByIndex(iIdx); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oParty, 20.0f); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDisguise, OBJECT_SELF, 20.0f); } everytime i try to use the force power the game stuck in the middle of the force power Link to comment Share on other sites More sharing options...
TriggerGod Posted July 31, 2008 Share Posted July 31, 2008 Ok, a few questions: 1) Did you follow the Force Power tutorial? 4) Did you insert into the k_inc_force script? Link to comment Share on other sites More sharing options...
ace92 Posted July 31, 2008 Author Share Posted July 31, 2008 1)yes i did 4)no i dont' think so...you mean the: #include "k_inc_force" than if so no i didn't...*embarrassed* Link to comment Share on other sites More sharing options...
TriggerGod Posted July 31, 2008 Share Posted July 31, 2008 1) KK 4) That is only if your using TSL, which, by the looks of your last post, you are. That tutorial should explain how to do it.. Link to comment Share on other sites More sharing options...
ace92 Posted July 31, 2008 Author Share Posted July 31, 2008 so what your saying that because i didn't add the #include "k_inc_force" it get stucked? Link to comment Share on other sites More sharing options...
TriggerGod Posted July 31, 2008 Share Posted July 31, 2008 No. The script k_inc_force is an actual script. Search for it in the KTool Script section. I haven't done any k_inc_force script modifying before, but there are some who have, such as Darth InSidious. Maybe they'd like the help ^_^ Link to comment Share on other sites More sharing options...
Darth InSidious Posted July 31, 2008 Share Posted July 31, 2008 That's only part of the problem, as far as I can tell: #include "k_inc_force" void main() { int iIdx; [b]//Undefined. How is this number being arrived at?[/b] effect eDisguise = EffectDisguise(671); [b]//The DISGUISE_TYPE_ integers defined in nwscript only go up to 308 - you're calling a number that isn't there.[/b] effect eLink1 = EffectAbilityIncrease(ABILITY_STRENGTH, 75); eLink1 = EffectLinkEffects(eLink1, EffectBlasterDeflectionIncrease(100)); eLink1 = EffectLinkEffects(eLink1, EffectAttackIncrease(3)); object oParty = GetPartyMemberByIndex(iIdx); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oParty, 20.0f); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDisguise, OBJECT_SELF, 20.0f); } My comments follow the // . Link to comment Share on other sites More sharing options...
ace92 Posted August 1, 2008 Author Share Posted August 1, 2008 ok... I decided i don't need the iIdx because i want it to be a force power on the PC only. effect eDisguise = EffectDisguise(671); the 671 is the row in the appearance.2da, if that's not the right command so what is? Link to comment Share on other sites More sharing options...
Darth InSidious Posted August 1, 2008 Share Posted August 1, 2008 You have to choose one of the predefined DISGUISE_TYPE_ integers in nwscript.nss - which only go up to 308. Also, you haven't told the script what iIdx is. Link to comment Share on other sites More sharing options...
stoffe Posted August 1, 2008 Share Posted August 1, 2008 ok... I decided i don't need the iIdx because i want it to be a force power on the PC only. effect eDisguise = EffectDisguise(671); the 671 is the row in the appearance.2da, if that's not the right command so what is? EffectDisguise() does use the line numbers in appearance.2da (which the DISGUISE_TYPE_* constants correspond to for default appearance types). Keep in mind that appearance.2da is indexed by line number (starting at the first line with 0 and counting down) and not row label (the number in the leftmost column in KotorTool's 2DA editor). Thus for the above to work your line would have to be number 762 counting from the top down. If the game crashes it sounds fairly likely that you are trying to use a non-existing or improperly set line in appearance.2da. The game has rather poor error handling when it comes to missing model data, generally resulting in crashes. A common source for crashes relating to appearance is when you give a NPC that is wearing armor or robes an appearance type that has no model assigned for the body variation used by that armor/robe's base item. Link to comment Share on other sites More sharing options...
ace92 Posted August 1, 2008 Author Share Posted August 1, 2008 ok i fixed it thanks stoffe and Darth InSidious, but there is a problem the force power does work, but the head that suppose be to be changed to isn't there just no head... any solutions? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.