Nirran Posted April 1, 2008 Share Posted April 1, 2008 what files i need to edit? Link to comment Share on other sites More sharing options...
Mindtwistah Posted April 1, 2008 Share Posted April 1, 2008 Traps? Link to comment Share on other sites More sharing options...
Nirran Posted April 1, 2008 Author Share Posted April 1, 2008 yea devastating sonic for instance,what files i need to modify? found what i needed,now have everything working cept the trap doesnt dmg the mobs lol this is what i have in my script #include "k_inc_debug" void main() { object oTarget; location lTrap = GetLocation(OBJECT_SELF); string sTrapID = SWMG_GetObjectName(OBJECT_SELF); Db_PostString("Trap Fired", 5,5,4.0); if(sTrapID == "Prototype Plasma Mine") { ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(1044),GetLocation(OBJECT_SELF)); int nDamage = 200; int nDC = 25 effect eDamage; int nDemoSkill = GetOwnerDemolitionsSkill( OBJECT_SELF ); if( nDemoSkill > 0 ) { nDamage += 3 * nDemoSkill / 2; } float fRadius = 3.3; if( nDemoSkill > 0 ) { fRadius += 0.1 * nDemoSkill; } oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTrap, TRUE); while(GetIsObjectValid(oTarget)) { if(!GetIsNeutral(oTarget, OBJECT_SELF)) { nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC); eDamage = EffectDamage(nDamage, DAMAGE_TYPE_BLASTER); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); } oTarget = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTrap, TRUE); } } } what am i doing wrong?most of that is copy paste from the game script those that are interested,this is what i had to do to make it work #include "k_inc_debug" void main() { object oTarget; location lTrap = GetLocation(OBJECT_SELF); Db_PostString("Trap Fired", 5,5,4.0); if(GetName(OBJECT_SELF) == "Prototype Plasma Mine") { ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(1044),GetLocation(OBJECT_SELF)); int nDamage = 200; int nDC = 25; effect eDamage; int nDemoSkill = GetOwnerDemolitionsSkill( OBJECT_SELF ); if( nDemoSkill > 0 ) { nDamage += 3 * nDemoSkill / 2; } float fRadius = 3.3; if( nDemoSkill > 0 ) { fRadius += 0.1 * nDemoSkill; } oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTrap, TRUE); while(GetIsObjectValid(oTarget)) { if(!GetIsNeutral(oTarget, OBJECT_SELF)) { nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC); eDamage = EffectDamage(nDamage, DAMAGE_TYPE_BLASTER); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); } oTarget = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTrap, TRUE); } } } Link to comment Share on other sites More sharing options...
tk102 Posted April 1, 2008 Share Posted April 1, 2008 @Mindtwistah, Darth Xander: Just because it is April 1, it does not give you a license to spam. @Danyael27: Please use the reported post feature. @Nirran: Not really sure what the benefit of checking the name of OBJECT_SELF. I would remove that conditional entirely, but it's working for you so no big deal. Link to comment Share on other sites More sharing options...
Nirran Posted April 2, 2008 Author Share Posted April 2, 2008 its all working except my mines dont show in the tooltip on doors and broken containers,any1 know what file i need to edit to add them? @tk102 yea i see now i dont need it,i only have it because the original game trap script had a if statement,ima take it out,thnx Edit: i have my custom mine/trap all made and it works in game but it doesnt show in the tooltip on locked doors and chests,anyone know what file i have to edit to add my trap to it? Note: I have deleted your thread in our Tools Forum and copied the text to this post here as you already have this thread here, please only 1 thread per topic/question. Thanks. -RH Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.