nakano15 Posted January 9, 2017 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 102 Reputation: 8 Joined: 01/26/15 Last Seen: April 30, 2021 Share Posted January 9, 2017 I'm making a change to one of my npcs, where bandits (basically monsters) can spawn to try killing the player, but to not bother other players by keeping them spawned for so long, I'm wanting to make so the bandits have a despawn time, so after that time, they disappear for good from the map. How can I do that? Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 9, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1632 Joined: 03/26/12 Last Seen: April 15 Share Posted January 9, 2017 You can either add a timer to each mob or you can do a simple killmonster on the map. I guess it depends on the map.. Quote Link to comment Share on other sites More sharing options...
0 nakano15 Posted January 9, 2017 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 102 Reputation: 8 Joined: 01/26/15 Last Seen: April 30, 2021 Author Share Posted January 9, 2017 On 1/10/2017 at 3:27 AM, Akkarin said: You can either add a timer to each mob or you can do a simple killmonster on the map. I guess it depends on the map.. I believe adding a timer to each mob is the best solution, since using kill monster on the map can end up killing bandits that spawned for other players too. But how do I make a timer for a monster? On 1/10/2017 at 8:16 AM, Skorm said: You can try the summon command just be sure to run it from an npc that isn't attached to the player. *summon "monster name",<monster id>{,<Time Out>{,"event label"}}; Some other methods... .mob_id = monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}); startnpctimer; end; OnTimer<time>: unitkill .mob_id; stopnpctimer; end; You could do the same thing as above but with killmonster instead. monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"NPC::OnBlahbanditded",<size>,<ai>}); startnpctimer; end; OnTimer<time>: killmonster "<map name>","NPC::OnBlahbanditded"; stopnpctimer; end; OnBlahbanditded: end; Ah, so there is how one does that. Thank you, but I believe I will have to attach the timer on the player instead, this will be helpful anyway. Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted January 10, 2017 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted January 10, 2017 4 hours ago, nakano15 said: I believe adding a timer to each mob is the best solution, since using kill monster on the map can end up killing bandits that spawned for other players too. But how do I make a timer for a monster? You can try the summon command just be sure to run it from an npc that isn't attached to the player. *summon "monster name",<monster id>{,<Time Out>{,"event label"}}; Some other methods... .mob_id = monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}); startnpctimer; end; OnTimer<time>: unitkill .mob_id; stopnpctimer; end; You could do the same thing as above but with killmonster instead. monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"NPC::OnBlahbanditded",<size>,<ai>}); startnpctimer; end; OnTimer<time>: killmonster "<map name>","NPC::OnBlahbanditded"; stopnpctimer; end; OnBlahbanditded: end; 1 Quote Link to comment Share on other sites More sharing options...
Question
nakano15
I'm making a change to one of my npcs, where bandits (basically monsters) can spawn to try killing the player,
but to not bother other players by keeping them spawned for so long, I'm wanting to make so the bandits
have a despawn time, so after that time, they disappear for good from the map.
How can I do that?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.