![]() |
Control NPC for spawning custom baddies?
This is likely years away from what I'm capable of. I'm creating a custom baddy but I'd like to have new baddies spawn on a timer. Is there a way to create new enemies with their own behaviour without having to manually place every NPC? From my limited experience with GS1 I think it would have something to do with putnpc2, but I'm working in Gonstruct so I can't be certain.
On a sidenote, if anyone can help me get the offline editor to work that'd be appreciated. |
You can basically add a class that you join via your baddy that contains a function which runs a timer each time the baddy dies. Or just add the timer in the script, but if you do what I'm saying you can add other functions for like making the baddy drop gralats or items when it dies.
This is the old function they used on Graal2001: NPC Code:function domonsterdeath() { So however your baddy death is handled, lets just assume it's really basic and you play the death animation and then do: NPC Code: and then the timeout part of your code would make it initialize again, so if your initialization is on creation of the NPC then just put onCreated(); in the onTimeout function sorry for mixing up gs1 and gs2 |
Quote:
NPC Code: although I kinda think its weird you have 2 flags that do the same exact thing. Regarding a NPC DataBase Spawner you could do. NPC Code: you could easily check the map when they spawn to make sure you maintain a max amount that are spawned on your map. It could get ugly if you don't you will end up with thousands of NPCs. |
All times are GMT +2. The time now is 05:14 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.