Deleting Objects Once They Leave the World?
Submitted by Dungeon Siege F... on Thu, 2019-09-05 16:18 | ||
Really quick, is there a way (in Dungeon Siege 1 LOA) to delete an object, specifically monsters, once they leave the loaded world or the frustum? I know that there are premade gizmos to do so, but I want the monster to delete itself through some sort of built in block without me having to wire it in SE. I can do this with skrit (I think), but I wanted to know if anyone else knew of a quicker way to implement this which has perhaps already been done, due mostly to pure laziness. I’ve looked around a bit but couldn’t find a skrit component that automatically deleted the parent actor on a, say, WE_LEFT_WORLD message. If anyone’s got anything, please lemme know. forums: |
||
» |
Is 'really quick' already over?
Now for the case the matter is still pending, should the monster return/reload when the frustum is loaded again?
A reload is not needed, just a way to delete the monster as soon as they leave the world. I’ve got other generators (which I still have to tweak), that respawn the monster based on character level. Basically my mod and map so far spawn monsters based on the immediate/closest characters level in the frustum. I want a way to delete said monster when it leaves active frustums so that characters of a different level can hit the area and get a different one to spawn.
Have you tried using (or adapting) generator_basic.skrit or generator_random.skrit ?
Each of them allows a 'kill_msg' - set it equal 'we_left_world' and spawned monsters should be removed (die actually).
Perhaps it's not possible/pleasant to use them 1:1, but it's a quite promising approach!(?)
Yeah, that’s actually one of the routes I was thinking of going. The one problem I thought of though was if the monster chases the player to an area where the generator leaves the world. I’m worried this would delete the monster rather awkwardly, making it disappear abruptly. Circling back to your point though, I’m currently messing with different pieces of the delete_object command, with the world message being we_left_world and making it native to the monster(s). Problem is, this takes a lot of time to put into each template without putting it in the larger parent templates (causing some game breaking stuff in normal DS, which I don’t really want to do).
Even so, any idea if my concerns are even real issues at all? They may not be as I haven’t even tested any out, just been thinking about pros and cons and possible issues.
Thanks again!
I (start to) see...
...however, what happens if monster and player change the 'chase direction' for some resons - and the new direction is towards the location of the location of the generator - how is it protected that the (former) generator (or the newly created instance of the former generator) does not spawn new/additional monsters? Is the generator itself (almost) never expiring for easier monster accounting? Or is the generator perhaps 'SCID-bit protected' anyhow?
Besides, how many monsters resp. monster templates would need the feature to eternally disapper when leaving the frustum?
I’ve actually been working with those same issues you brought up for a while now. I’ve gone back and forth on many of them. Basically I want my map to have a ‘dynamic’ leveling system where the generator checks the nearest player in the active frustum and spawns a monster according to their Uber level. I’ve gotten that last part to work, but I want to be able to delete the monster as soon as the player leaves the frustum to stop high level monsters from staying where low level characters are and vice versa.
Code can always be changed accordingly but I guess bottom line basic starting point is where do I even add the delete command? In the monster? In the generator? Both perhaps? I’ve given it some thought but haven’t actually implemented it (deletion), and right now the monster stays in the world until it is killed by the player.
.. leave the world (though not in quite the way desired here) so how about looking to borrow code from them? (Especially those summoned by the evil side)
Summoning is a pretty good idea. Haven't had much time to mod lately, but I'll have to check up on that when I can.