This is the only place I could figure out where this thread might go, even though I don't really see any threads like it around. If I have the wrong subforum, please let me know and maybe move the thread to the right place? Or I'll delete it and move it myself, if necessary.
I have some ideas in my head for some custom elements to script into DROD, but I'm not terribly familiar with the deeper aspects of the scripting, and it is honestly a bit obtuse to someone who's learned a tiny bit of Java and C++ and not much else. So I'm trying to figure out whether or not it's even possible to build the things I want to build, and also, if it requires some obscure aspect of the language that would be difficult to find on one's own, I'd like to be educated in the use of that aspect. So, here we go:
Is it possible to have an NPC generate another NPC and dictate what the newly-made NPC's script is? For example, would it be possible to, entirely in script, have an NPC place a "
roach egg"
(also an NPC), along with script on the egg itself that would make it "
grow"
and turn into a roach (via disappear+generate Roach at me, or such)?
Is it possible to tell an NPC to target a specific kind of monster (say, roaches only, not roach queens), nearest first (straight line of sight), and go attack it, similar to how fluff targets monsters, but only with a specific kind?
Is it possible to give an NPC a "
chase Beethro"
behavior that still respects invisibility?
Is it possible to make an NPC activate the threat clock while alive and make the threat clock disappear when it dies, but only if there aren't other things that make the threat clock appear around (like what happens with snakes, roach queens, etc.)?
Is it possible to make an NPC move along a straight line until it hits an obstacle,
all in the same turn?
Is it possible, given the above, to check what obstacle the NPC hits, and whether or not it crosses a certain kind of tile on the way there (like say, shallow water or hot tile)?
Is it possible, using the "
Wait for someone to push me"
command, to then detect which direction (north/south/east/west/etc.) the push came from?
If it is possible, and not all that hard, I'd appreciate a hint on how to make it, so I can work out the rest on my own. If it's possible and requires some obscure trick to make it work, please enlighten me. If it's not possible, please let me know so I don't waste my time trying to do it.
____________________________
109th Skywatcher
Here are some links to Things!
Click here to view the secret text
[Last edited by Xindaris at 07-20-2015 04:27 PM]