Author Topic: Simple question about repairing objects.  (Read 391 times)

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Simple question about repairing objects.
« on: August 29, 2010, 01:36:05 am »


               The mod I'm working on has outer gates that can be breached after taking enough damage. I'm trying to make a tool that allows PCs to repair damage to said gates. (and, if I can get this working, also seige weapons) Problem is, Lexicon says:

"EffectHeal has no effect when applied to placeables and doors. To the
authors' knowledge, there is no way to restore a door's or a placeable's
hitpoints. If applied to them, it will mearly fail and do nothing.
"

Soooo, is there a reasonable way to make an effect restore some HPs to an object?

On the server "Castle Defense" there's a gate repair system, but the builder seems to have written a custom "bashing" system where each blow counts as 1% damage to a gate. I'd rather avoid a tedious and cumbersome system of local ints, calculations, and heartbeat blah blah blah for this, especially as we're taking gate vs. NPCs AND PCs as opposed to gate vs. stupid monsters that stand there and whack away predictably. I don't even know if his sytem would work in my mod.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Simple question about repairing objects.
« Reply #1 on: August 29, 2010, 02:24:37 am »


               Normal doors can be respawned by using setisdestroyable to false trick and then effect heal - the lexicon is wrong there. However gates missing the destroyed animation state and can't possess this feature. I'm looking especially for this modelers to my community patch project.
               
               

               
            

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Simple question about repairing objects.
« Reply #2 on: August 29, 2010, 04:09:53 am »


               bfasifbaidfasbfssfhsgffh,,hjfdi !!!!



Never mind, when I actually went ahead and tested it it worked. Apparently EffectHeal() DOES work on objects, at least on the gate I'm testing on.



So, woo I guess? MOVE ALONG NOTHING TO SEE HERE.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Simple question about repairing objects.
« Reply #3 on: August 29, 2010, 06:01:22 pm »


               That was added into a patch some time ago. So before when that Lexicon entry was put in you could not heal doors that way.
               
               

               
            

Legacy_Jesse_the_Thief

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
Simple question about repairing objects.
« Reply #4 on: August 30, 2010, 12:47:41 am »


               Yeah, the deeper I get into scripting in NWN the more impressed I am with all the work Bioware did on this game fixing, tweaking, and adding new scripting stuff. Wish they were still supporting it.