Ambrosia Garden Archive
    • Controlling NPCs


      Is there a way to change various variables on an NPC from an event? I've tried a few things but I can't see any way of changing the values. I've been trying to use an NPC Control action to delete one NPC and replace it with another one but I can't do that for wandering NPCs. How do I do it?

      ------------------

    • Quote

      Originally posted by Kelsan:
      **Is there a way to change various variables on an NPC from an event? I've tried a few things but I can't see any way of changing the values. I've been trying to use an NPC Control action to delete one NPC and replace it with another one but I can't do that for wandering NPCs. How do I do it?

      **

      Unforutnately, I don't know... but I had the same question myself. It would be nice to be able to either change the stats on an NPC (which would unfortunately affect every NPC of that type), or better yet, to swap a specific NPC on the map, with a different type of NPC (in a seamless manor.)

      -Jeff

      P.S. - Did that make sense? My eyes are still blurry from just getting up. I stayed up most of the night playing with Coldstone. 🙂

      ------------------
      Experiences = Integrate( Life, {t, birth, death} )

    • Without the experience necessary to tell you for sure (or how), I would be pretty confident Coldstone can do that.

      ------------------
      quitcherbellyachin.
      ---
      New Fortress of Die Nacht released! (12/20) (url="http://"http://aviary.damnsw.net")Download it from here!(/url) | | (url="http://"http://aviary.damnsw.net/downloads/dienachtd5.sit")direct download(/url) | | (url="http://"http://aviary.damnsw.net/fortress/progresslog.html")Progress Log (12/20)(/url)

    • I haven't been able to find a way to set a variable on an NPC. Instead, what I've done is created several variations on an NPC. For example, I created a "normal" NPC who was sitting in Fantrima. After a specific event, I deleted the "normal" NPC and replaced it with an NPC who went running towards the player.

      It seemed to work pretty well. You do have to be careful about duplicating NPCs, though, because you can end up breeding them like rabbits.

      --v

    • I've tried that method as well, but if the original NPC is wandering it will seem to jump position when it's replaced. Besides, I can't get the method working properly. The program deletes the original NPC but doesn't replace it with the new one.

      ------------------

    • Quote

      Originally posted by Kelsan:
      I've tried that method as well, but if the original NPC is wandering it will seem to jump position when it's replaced.

      It won't be an issue if you set the first NPC to not move from its one location, I think.

      Quote

      Originally posted by Kelsan:
      **Besides, I can't get the method working properly. The program deletes the original NPC but doesn't replace it with the new one.
      **

      Hrm... I think you have to kind of twist the events to work like a mission bit in EV. It should be possible with conditionals.

      ------------------
      "The French model seems to show that, ultimately, someone will do my work FOR me."
      (url="http://"http://ucplugs.evula.net")EV/O/N Upcoming Plug-Ins Directory(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://www.evula.com")EVula.com(/url)

    • Quote

      Originally posted by Kelsan:
      **I've tried that method as well, but if the original NPC is wandering it will seem to jump position when it's replaced. Besides, I can't get the method working properly. The program deletes the original NPC but doesn't replace it with the new one.

      **

      I've thought about this, since control of NPCs is one of my big problems. The only thing I can think of is to arrange it so that you trigger a "teleport" action that takes the player into a "main location" (replacing the map) where some plot point is made, then, before you teleport back to the map, you swap out the two NPCs. I'm not sure if this would work, though. Can you have an event in a main-type location affect things in a map location? Maybe use an initialization event in the map location, using a global variable set to spawn the replacement NPC?

      In general, I hope that in future versions of Coldstone, anything you can do with your player character you should be able to do with NPCs. The Attribute, Item and Gold wizards should work with them, events attached to map tiles should respond to them, etc. The workarounds I've come up with so far may be workable (haven't tried them), but inelegant.

      ------------------
      --
      Mark

    • Hi,
      Here an idea: use global variables. Set each statistic to a global variable and then use an event to change the value of the variable. I haven't tried this yet so I dont know if it works.

      What I would like to be able to do is have an action that changes the NPC's AI; therefore could have an opportunistic NPC that is very aggressive initially but that then runs away after a successful strike.

      Gallandro

      ------------------
      "(Even though you just obliterated a fleet of Galaxy Destroyers) Prepare to die!" says the confederate gunboat pilot.

    • Quote

      Originally posted by Gallandro:
      **Hi,
      Here an idea: use global variables. Set each statistic to a global variable and then use an event to change the value of the variable.
      **

      But then how do you get those variables to map into the NPCs statistics? You can't enter a variable as a value for the NPCs statistics, and I haven't come across another way. So I don't think this is going to help at all.

      -Jeff

      ------------------
      Experiences = Integrate( Life, {t, birth, death} )

    • I've found a lot of ways of solving these problems, but all of them require using a variable as a value. For instance, the problem of wandering NPCs jumping when you replace them could be solved if Coldstone allowed you place the new NPC at &&ActualX; and &&ActualY; from inside the originals' script.

      ------------------