Tried to make soul type of death, but found the death system be a bit tideous and some other questions.

Hi, I've been playing around with mv and played around with events. (below 2 pics)
While it can spawn the lost soul on the map where character dies, it seems very clunky as the map gets bigger. Would need to control switches total map that characters can die minus the one you're currently on so there are no "left over" souls in previous map.
Can this be done more elegantly? I know it's possible to make an universal lootbox in every map so just use a universal control switch, but it doesn't have the dead on spot feel.

Also another problem, the set event seems working odd. I believe I get the formula right, but it spawns the soul off the place where I fight the enemy, most of time it's 3 steps above the enemy. Player transfer also goes to very random places using variables unless I have a specific x,y. Is something I'm missing?

Finally, the game often goes to the keep loading screen. I just redo the mv default tutorials and it still gets to the loading screen often, and may need to wait 15 seconds for attacks in the test battle (against the bat) to register. Is there someway to fix it? Sometimes MV would just crash too when loading maps.
darkiesoul.png

darikesoul2.png
Hi, I'll admit I can't quite picture how all of this works.
But, I have a thought on your event location problem.
Also another problem, the set event seems working odd. I believe I get the formula right, but it spawns the soul off the place where I fight the enemy, most of time it's 3 steps above the enemy.

Event 17 in your image is setting the event location to the var #6 "Player Gets Killed" which gets the value of "Map X of this Event".
But you aren't setting "Map Y of this Event" for the event location. This means that the event will never have the same vertical position on the map as the player did when he lost the battle.

Player transfer also goes to very random places using variables unless I have a specific x,y. Is something I'm missing?
Hm. It sounds like something else is messing with your variables or maybe you aren't setting them right. Try using the Event Searcher to find all events that use your variables and check what is being set.
1628575651480.png

Remember, you want to set the X and Y coordinates for the player transfer variables, not just the X.
I hope I have written something useful 🙂
Event 17 in your image is setting the event location to the var #6 "Player Gets Killed" which gets the value of "Map X of this Event".
But you aren't setting "Map Y of this Event" for the event location. This means that the event will never have the same vertical position on the map as the player did when he lost the battle.


Hm. It sounds like something else is messing with your variables or maybe you aren't setting them right. Try using the Event Searcher to find all events that use your variables and check what is being set.
View attachment 198250
Remember, you want to set the X and Y coordinates for the player transfer variables, not just the X.
I hope I have written something useful 🙂

Hi, when setting up event location with variables, it would look like the one I posted.
location.png
Like autodidact says, you need two separate variables: one for X, one for Y.

At the moment it will use the same value for both coordinates. E.g. if the player dies at (5, 12), the lost soul will be located to (5, 5), because that's the X coordinate.

Edit: if you want unlimited "lost soul" events, consider an event spawner plugin, e.g.

Not sure what's going on with the long loading times. Maybe some other application or security feature on your system is impeding file access. I do not recommend storing your projects in a restricted area, e.g. Program Files. Consider storing them in your user Documents folder.
Like autodidact says, you need two separate variables: one for X, one for Y.

At the moment it will use the same value for both coordinates. E.g. if the player dies at (5, 12), the lost soul will be located to (5, 5), because that's the X coordinate.

Edit: if you want unlimited "lost soul" events, consider an event spawner plugin, e.g.

Not sure what's going on with the long loading times. Maybe some other application or security feature on your system is impeding file access. I do not recommend storing your projects in a restricted area, e.g. Program Files. Consider storing them in your user Documents folder.
Sorry, I don't understand how does choosing the variables work for map. Do I have to make two variables in the same event where the player parts get killed so I can choose a different Y? What determines an event to have a x or y coordinate? Searched on google but cannot find related posts.

For the lost soul problem, it's that if the player goes to another spot and get killed again, the first lost soul event would still be there.

For example, there are map a b c. Player has 100 soul, goes to A, get killed. Now in map A there is a lost soul event that has 100 soul.
This time he brings 200 soul, goes through map b to c, and gets killed again. Now Map C has a 200 soul event, and Map A lost soul event has 0 soul. However, the fire icon would still be there.

I guess it's possible to make another variable and condition so if soul is less than 1, it does not show. My working laptop isn't with me so have to wait after a few days to try this. Just raw thinking, this might need to make a how much lost soul is in each map as variable so this may actually be messier than copy paste the control switch (of each map) off.
When the player dies you should set a variable to the MapID.
Then have a common event with a parallel process turn the Lost Soul switch on or off if the current map matched the ID stored in the variable. That way you don't need a switch for every map.

X and Y are the vertical and horizontal grid coordinates. You'll want to set both to separate variables so you can set the event location to the exact position tile the player died on.
But I've always thought it was dumb you couldn't use 1 variable for both. I'll tell you a secret: you can, but forget about using the "Set Event Locations" commands.
Instead of using the traditional "set variable" use the "script" and enter this line
$gameVariables.setValue(6,[$gamePlayer.x,$gamePlayer.y])

With the Lost Soul event, set the movement to custom, open the move route settings and select "script" using this line:
this.setPosition($gameVariables.value(6)[0],$gameVariables.value(6)[1])
This moves the event to (x,y) coordinates stored in variable 6 as soon as the event takes a step. I recommend setting the Lost Soul event's Frequency to Highest, so that it moves to where it needs to be instantly, upon entering the map.
Thanks everyone, I've the soul death spawn system completed. Throw the whole turn off all switch of each map to a common event, then put the "deposit soul" lines to another event and now things look much cleaner.
MV still needs to loads for a long time randomly when starting game, getting to another map, quit menu, in combat, or sometimes just crash, maybe time to buy a new laptop.. (still using a i5-2540m)

Original thread: https://forums.rpgmakerweb.com/threads/tried-to-make-soul-type-of-death-but-found-the-death-system-be-a-bit-tideous-and-some-other-questions.139431/