Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi, I'm very frustrated. I'm trying to make a stationary NPC that can attack the player through spells, such as a rooted flower that sprays poison, or a stationary gun that shoots electrical zaps at the player. I've tried lots of stuff to make the NPC stay put, but none of it seems to work. I've used aggressive casters, and passive NPC's, and tried setting their map range to 0, but this AI feature seems to only be effective untill they see the player or are attacked by the player, then they can move. I've tried setting their speed to 0, but that doesn't work, I've seen mentioned somewhere that that's still a bug. I've even tried setting their morale to 0, since that's supposed to at least keep them from running away after they have been attacked (or their allies) a certain amount, but that doesn't seem to work either! Maybe there's some mystery code that sets all 0's to 1's and needs to be removed. I don't expect a bug fix anytime soon though. :frown:
I could make all the tiles around them inaccesable, but then the player couldn't attack them, so that's out. I guess I could try just making the tile they are standing on inaccesable... (and then flip it when they die...) I hadn't thought of that, that might work, but I doubt it. I'll try when I get home though. (Nope, that didn't work.)
I've been bashing my head on this for a while, does anyone else have a method that actually works?
Can I pay someone to fix the 0 speed bug? (Yes I did register.) I'd fix the bloody thing myself if someone was willing to send me an NDA and the source code. Oh how I wish I could patch the engine.
Thanks, Katherine
------------------
Quote
Originally posted by Katharos: ~snip~
Ms. Katharos,
Unfortunately I believe this is still a bug. You can try to set the NPC to always try to reach the cell that you place it on(thats in the last tab menu of the NPC creation), but I don't think that will work either. Hopefully this will be fixed in the next update, or perhaps Glenn will have a work around for this.
Sorry.
------------------ "But soon, soon, soon... the world will be a better place, with meadows and bunnies and fiber optics in every home..." - Tom Dowdy, Apple Computer ------------------ (url="http://"http://www.avalon.net/~honda/pog/pogwalkthrough2a.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PoG_Dev_Tools_Source.sit?path=coldstone/resources&file;=PoG_Dev_Tools_Source.sit")PoG Dev Tools(/url)
The only way i've found to get around this is to set the "delay between movement" for the NPC to a massive number. Just hold your finger down on '9' and count to five, hehe It seemed to work for me, althought of course if your player is around the NPC for long enough it will start to move about. Hope I helped!
------------------ "If it's too hard, I can't understand it."
Originally posted by Migraine: The only way i've found to get around this is to set the "delay between movement" for the NPC to a massive number. Just hold your finger down on '9' and count to five, hehe:) It seemed to work for me, althought of course if your player is around the NPC for long enough it will start to move about. Hope I helped!
Hmm. Will the NPC move once though and then stop for a long time, or does the delay go into effect right away so that the NPC waits for his its first move?
Nice work around though Migraine. That should at least get things "working" until this is corrected.
Thanks, that's a good idea, does anyone know what the size of the variable that holds the interval between movements? That is, is it different in the uncompiled game vs compiled game, because I can test the size in the uncompiled game just by saving and going back to the dialog. Good thing the time between attacks and the time between movements is different.
The NPC shouldn't move first if you set it to hang out on the map with a movement range of 0, unless when the player is teleported to the map they are within it's line of sight... Do the NPC's think when they are in view on the screen (+n cells) or do all the NPC's on the map get to think? I guess I have been assuming that all NPC's on the current map get to think.
Thanks again, Katherine
Ok, I checked it out, and Coldstone appears to save the movement interval as a signed 16 bit value, so the max positive is 32767. Anything over that value gets wrapped. So Migraine you might not want to hold down 9's for 5 seconds, since that will probably give you an unpredictable value, anywhere from -32768 to 32767. It doesn't appear to check if the value is over the storage size, maybe it just writes 16 bits of it... Actually, the interface seems to cap the value at 2147483647, which corresponds to a signed 32 bit value, but write it as a 16, which is a bug, so I guess if you enter lots of 9's you should always get ... no... well, in the OSX version you always get -1. Which is curiouse, because the interface also checks and sets the value to be greater than or equal to 0, but can still write a negative number since it's writing a 32 bit value in a 16 bit space... or something.
Anyways looks like the max pause between moves I can expect is 32 seconds, which is a bit, but not as much as I was hoping for. I guess I'll just have to wait for a bug fix.
Ok, I did some testing on the train to work, and it seems that several things override the interval between moves. The interval between moves, much like the map range appears to only really be meaningful when the NPC is not attacking or running, just when it's idling. If the NPC can see you, but their spell is not in range, they will move as often as they need to to keep you in range. This can obviously be worked around by making the spell range greater than the NPC line of sight, but I wanted to explain when I thought the movement interval value was relevant. Also when the NPC is running away, the movement interval doesn't seem to have any effect. So setting the movement interval doesn't seem to be any more effective than setting the NPC's movement range to 0, both values only take effect when the NPC is idling...
Migraine does this work differently for you? If so what version of things are you using?
Oh well, I guess my conclusion is the same... wait patiently for a bug fix...
Thanks for the ideas though guys, Katherine
I have a painting that chucks spears. The spear itself is the NPC. When the hero steps on specific tiles, this calls an event that creates the NPC which launches from its creation point of the painting. It hits, does damage and selfdestructs. (The way to avoid the painting is to drop a cloth over it from above triggering a global that deactivates the tile events.) Now, I haven't figured out how to "kill" the painting like you might want to do with a poison dart tossing legume but perhaps this will get your creative juices flowing.
Apollo16
Originally posted by Katharos: I could make all the tiles around them inaccesable, but then the player couldn't attack them, so that's out.
You were on the right track here. The trick is, make the movement grid small, like 3x3 or 4x4 or something. (1x1 and 2x2 are too small to do well.) Then surround the NPC with inaccessible tiles. This way, the player's melee attack will pass over the tiles and hit the NPC (unless you were drunk when designing the player's attacks, and made the range less than 5 pixels.) I've tried it, and it works perfectly.
Attach an event to the specific NPC's death that grants access to those tiles later, if you so wish.
------------------ Consider. If passion rules our reasoning, and we are ruled by logic, we are all simply unwitting slaves to emotion, pretending to be greater than what we truly are.
Apollo16, your idea is good for one off monsters, and your painting sounds very interesting! But I need something for generic monsters, and I do want to be able to kill them.
Celchu, your idea is the most practical I've heard yet, thanks! I'm not sure what the game cost of decreasing the movement tile size by that much is, but I'll think about it.
How do you set the range of the players attack in pixels? I guess you mean the players bounding circle... for some reason I was thinking before that that influenced how close you could get to the restricted access tiles, but of course it doesn't, you can walk on any tiles that aren't restricted.
--Katherine
Originally posted by Katharos: I'm not sure what the game cost of decreasing the movement tile size by that much is, but I'll think about it.
Don't worry about that, I've had no slowdown whatsoever with even 1x1 movement grids, and I run a lowly 350 mhz iMac.