Jump to content

Burning building has to go when player not around.


Recommended Posts

So after a complex routine of life and death, player escapes the nurning building. Here is a screenshot of a burning building if you have never seen one.

Looks great - yeah. But it can't burn forever, it will have to become a pile of ash eventually. Player hanging around for this is... well stupid and if a player wanted to I wouldn't be arsed to script a building collapsing. NOT like in the Civil War in the main game where buildings are disabled and burning buildings enabled, very few objects to deal with, because I MADE (yes custom parts inside) this shack I have about 30+ parts to disabled and thankfully less to enable. The enabled objects being burnt timbers etc. like Helgen.

Anyway... my thinking is when do I do this 'swap'? The building dominates the cell and is visible from far away, especially on fire. I couldn't use OnCellDetach, could I? But any script that checks if player is leaving an exterior cell into another exterior cell is pointless because the shack is still in view. Player has to be FAR away when the swap happens. My other thought was 'Player goes into an interior cell and when he comes out... voila 1 burned down building. Not immersive if player ducks into an interior then straight out again, plus I have no interior cells nearby and don't plan any.

Thoughts on how I could do this and not make it look like a 1990s game.

For some reason I can't upload a 173kb screenshot but you know what a burning building looks like.

 

Link to comment
Share on other sites

- Using " OnCellDetach " won't work since it's an exterior cell.

- Using this could work, but it has to be far and force the Player to go there, like to do something on a " Timer " :

Event OnLocationChange(Location akOldLoc, Location akNewLoc)


Event OnLocationChange(Location akOldLoc, Location akNewLoc)
if (Game.GetPlayer().GetCurrentLocation() == akOldLoc)
; Do Stuff
endIf
endEvent

- The only immersive way i can think is to force the Player to go on a quest just right after your " Fire Scene ", and at some point in the quest DO YOUR STUFF.

Link to comment
Share on other sites

The trick to enabling multiple meshes at the same time is to link them all to an "enable parent" reference - usually just an Xmarker or something. Then in your script (or however you trigger the change), you just enable/disable the Xmarker and all of its children will do the same.

 

As for when to trigger the swap, you may want to look into the "GetDistance" and "IsNearPlayer" functions. The first one allows you to measure the distance. The second is probably what you want, though - it checks to see if the player is within render distance of an object.

Link to comment
Share on other sites

"GetDistance" and "IsNearPlayer" won't help in what antstubell is trying to achive, those two are mainly and mostly used for interior cells, example :

- If you use the "GetDistance" the number required for the swamp to be trigger after the house is out of seight, would be ridiculously long, a huge number. like a 1.000.000 or more, in all of that time needed to reach that distance number, in which you'll probably be wandering around, the script will be counting (continuously active).

Link to comment
Share on other sites

I would do a line of sight check and a distance check on each location change until the player is far enough away and not looking in the direction of the building. It won't take too many checks before it meets success. If the building is in a location with other nearby buildings you might need to make sure the player isn't in one of those unless you are willing to have it collapse while the player was inside. (And OnLocationChange doesn't fire "continuously" it's actually fairly rare and a reasonable event to use for this purpose.)

Link to comment
Share on other sites

An other simple way to do this is to place a trigger box in the exit of your burning house, and when the Player exits and triggers it, the trigger box will run a simple script that will make the swamp after 12 in game hours ( or at any time you want ).

 

* I don't think any player will stick around the house for 12 hours.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...