Dealing with bashed in doors...

Moderator: Event DM

Post Reply
Maska
Whiney Peasant
Posts: 13
Joined: Wed Oct 01, 2003 4:50 pm

Dealing with bashed in doors...

Post by Maska » Sun Nov 09, 2003 2:17 am

Anyone have a script or funky ideas that would fix bashed doors in a PW?

I was thinking of maybe having some kind of OnDeath event for my doors that when they get killed a carpenter NPC is spawned that walks to the door and fixes (respawns) it ... but am very script n00b so not sure how to proceed....
Maska
DM_Tim
Newbie
Posts: 8
Joined: Mon Nov 17, 2003 1:20 am

Breaking doors

Post by DM_Tim » Mon Nov 17, 2003 10:18 pm

Actually, I looked into this awhile back. Sadly, damaged and destroyed doors can not be reparied. The work-around I came up with was to create custom doors with hundreds of hit points and to modify thier onDamaged event so that the door keeps track of how many points of damage they've taken. When it exceeds what the doors hit points should be, it unlocks and opens.

I haven't done it myself, but you could simulate "fixing" a door, by setting an action on a delay that would close the door, lock it and set a new damage threshold on the door for unlock/open.

Though eventually the door will be destroyed, just nothing you can do about it, there's no effect that repairs damage to nonliving objects.

Not the best solution, but one that sort-of works.

Regards,

- DM_Tim
Dead men don't spam.
User avatar
Papainhell
Sage
Posts: 2138
Joined: Wed Oct 01, 2003 1:09 am
Timezone: Time?
Location: Kodiak, Alaska (for now)
Contact:

Post by Papainhell » Thu Jan 08, 2004 11:38 pm

II have a few examples for ya :)

I build for a nother PW and we use this script on on most of our doors:

-Door is set to plot.
-Door is locked, note the DC of the lock.
-This script goes in the OnPhysicalAttacked Event:

Code: Select all

int DoorBash(object oPC)
{
object oBasher=GetLastAttacker();
int nLockDC=GetLockUnlockDC(OBJECT_SELF);
int nSTRMod=GetAbilityScore(oBasher,ABILITY_STRENGTH);
int nRoll=d10()+1;
int nSuccess=0;
if (GetIsPC(oBasher))
{
SendMessageToPC(oBasher,IntToString(nRoll)+" (roll) + "+IntToString(nSTRMod)+" (STR mod) versus DC "+IntToString(nLockDC));
if (nLockDC<=(nRoll+nSTRMod))
{
nSuccess=1;
}
}
return nSuccess;
}
void main()
{
int nSuccessAttempts=0;
object oAttacker=GetLastAttacker();
nSuccessAttempts=DoorBash(oAttacker)+DoorBash(oAttacker);
if (!GetWeaponRanged(GetLastWeaponUsed(oAttacker)))
  {
    switch(nSuccessAttempts)
      {
        case 0:
          ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(),oAttacker,5.0f);
          PlayVoiceChat(VOICE_CHAT_CUSS,oAttacker);
          break;
        case 1:
          PlayVoiceChat(VOICE_CHAT_CANTDO,oAttacker);
          SendMessageToPC(oAttacker,"You fail to bash the door in.");
          break;
        default:
          SendMessageToPC(oAttacker,"You manage to bash the door open.");
          SetLocked(OBJECT_SELF, FALSE);
          ActionOpenDoor(OBJECT_SELF);
          break;
       }
  }
else
  {
    SendMessageToPC(oAttacker,"You cannot bash a door with a missle weapon, silly!");
  }
}
ALSO

To close the door and relock it:

This goes in the OnOpen event of the door:

Code: Select all

void main()
{
    DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
    DelayCommand(10.5, ActionDoCommand(SetLocked(OBJECT_SELF, TRUE)));
}
Now, this requires that you do the following:
- Door is set to plot
- Door is set to locked. (( The DC of the lock is the DC of the STR check for the door bash)) Upon a failed doorbash, the attacker will be knocked to his knees,ass.

What ever you set the door lock DC as will be the door bash DC. The door bash DC is overcome by a STR check with this as the check:
STR check for door bash- a d10 plus your str modifier, so if you had a str of 12 and you were trying to bash a door that had a lock DC of 20 you would need to attack the door and a door bash check would be made. This doorbash check would equal a roll od 1d10 plus your STR modifier ((12= plus 1)) IF you rolled an 8 on your roll plus your STR modifier of plus 1 you would be knocked to your ass for 5 seconds.

If you need further explanation, let me know via PM and I'll help ya out :)
Image
Playing as:
Master Odel Helmsplitter
Odel Helmsplitter- Hammer Fist Stylist, monk of The Order of The Dragon.
User avatar
sinn
Elder Sage
Posts: 4315
Joined: Thu Nov 13, 2003 4:58 pm
Location: CA, USA (GMT - 8 hours)
Contact:

Post by sinn » Fri Jan 09, 2004 6:38 am

well has anybody here even hung a real door?...one of the hardest thing todo... you can build wall..easy..a floor..easy.. but hanging a door... a really big one.....thats where the work is, making it fit in the frames.. making sure it dont rub... and dont even go into closers*sighs*
you can run all your life, but not go anywhere.
ashzz
Scholar
Posts: 1033
Joined: Wed Mar 26, 2003 7:49 am
Location: Canadian stuck in Germany

Post by ashzz » Fri Jan 09, 2004 8:09 am

reminds me of the time a buddy of mine and me fixed a door that someone broke at a party, had to fix it before his dad came home and found out we had a party so he didnt get in trouble...man...that DOOR

what a pain in the ASS to get it to fit!
Disobedience is the true foundation of liberty. The obedient must be slaves.
Post Reply