ID:272459
![]() Jul 19 2008, 2:22 am
|
|
How Do I Make It So When I Kill A Monster It Goes To It's Spawn I.E. If I Go Kill A Monster It Would Go Back To It's Original Place On The Map Or Create A New Mob Or Whatever.
|
Wanna bet that Lunar isnt going to Understand that? Because if he is asking something that Simple... then he probally wont know how to even call the Proc. Lets just wait and see what he says .. :D -SubZeroChaos |
It's not a "noob question," and you don't need to feel stupid or embarrased asking it. The subject is actually pretty confusing.
There are two ways to go about respawning: 1. Delete the monster, and spawn a new one in its designated respawning spot. 2. Reset the monster's statistics and move it to its designated respawning spot. The latter is less resource consuming, but it tends to be harder to implement, so let's go with the first option for now. This is what I'd do: Give monsters a set of variables storing the x,y,z coordinates for its respawning location. Let's call these respawn_x, respawn_y, respawn_z. Also, let's give them a proc called "GetRespawnLoc," which is responsible for turning our coordinates into an actual location. mob/monster Using our new data, respawning is much easier. We need to create an object of the monster's type in its respawning location, and delete the monster afterwars like this: mob/monster And that's it. Feel free to ask any questions. |
SubZeroChaos wrote:
I don't think you need to jump the gun, or make any remarks like that. The forum is made for anyone in need of help or who has questions about a coding issue. |
Something like this?