Jump to content

Home

Disappearing bodies


SpaceAlex

Recommended Posts

Would it be possible to keep the bodies from fading away after you kill (or destroy) someone?

 

It seems that the game allows up to max. 3 bodies on the screen. I opened a few scripts to check if there's any way to increase that number, but so far i haven't had much luck.

Link to comment
Share on other sites

Set this to an OnHeatbeat event:

#include "k_inc_utility"
#include "k_inc_debug"

void main()
{
   object oCorpse = GetObjectByTag("/*Corpse Tag*/");
   int iCorpse = GetLocalNumber(oCorpse, 0);

   SetLocalNumber(oCorpse, 0, iCorpse);
}

You'll probably have to change the tag to whatever the corpse type's tag is, for instance, the tag for a dead wookie is 'WookieCorpse'.

Link to comment
Share on other sites

To expand on Darth333's post above. Instead of messing with the on Heartbeat script I would adjust the onEnter script for the module. That is if you are looking to make the corpse placables a permanent part of an area.

 

Also might I suggest checking out my recently started thread relating to a custom holowan include file. I have provided a simple function to spawn a placable by simply entering all of the proper data in there various fields. There are also samples of how to use these functions.

Link to comment
Share on other sites

I have something else that's bothering me :D : On the Nar Shaddaa docks apartment complex, there's a bounch of NPC's that you can talk to. The problem with them is that they just keep standing there. They don't do anything. If you leave the area for a while and come back, they'll still be standing in the exact same area. I would be satisfied, if they would at least close the doors after my PC's finished with them.

 

So my question is this: what do i have to do to make them close the doors after i finish my conversation with them?

Link to comment
Share on other sites

So my question is this: what do i have to do to make them close the doors after i finish my conversation with them?

 

You could place a trigger outside the exit from the Flophouse that closes all the doors when the player crosses it. An OnEnter script for the trigger like this one should work, though it would close all doors in the area and not just the flophouse doors:

 

void main() {
   object oPC = GetFirstPC();
   if (GetEnteringObject() == oPC) {
       object oDoor = GetFirstObjectInArea(GetArea(oPC), OBJECT_TYPE_DOOR);
       while (GetIsObjectValid(oDoor)) {
           AssignCommand(oDoor, ActionCloseDoor(oDoor));
           oDoor = GetNextObjectInArea(GetArea(oPC), OBJECT_TYPE_DOOR);
       }
   }
}

 

If you just want to close the flophouse doors you'll have to check what tags those doors have, and hope that they have unique tags (and if they do not, change their tags to be unique).

 

If you don't want to edit the area to add a trigger, you could use pretty much the same method fired from a dialog instead, though you'll have to remove the GetEnteringObject() check line. The problem with that is that the player most likely is inside the room when they talk with the inhabitants, so they'll need to open the door to get out anyway. :)

Link to comment
Share on other sites

Almost all doors in this game have the same thags, so i'll just use the script you've provided me with. It doesn't matter to me if all doors in the module close, as long as i don't see the NPC's standing like some idiots in there. I think i'll put a trigger just outside the apartment complex, or i'll use Fassa's dialoge to fire up the script, which will take a lot less time.

 

Thanks for your help.

Link to comment
Share on other sites

~

errr...yes and a pretty easy way: you can use corpse placeables :p (look at placeables.2da: you'll find a few corpse models)

Umm... what exactly do you have to do to the placeables.2da to actually modify the amount of corspes in the area?

 

Any help would be greatly appreciated!

~

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...