Ambrosia Garden Archive
    • Player and npc "looking at each other"


      Hi, I've made a search but didn't find anything on this subject:

      Is there any action that is executed when the player is on the same screen as an NPC? I want the npcs to scream things to the player when they are close to each other, so is there any way to do this?

      Thanks and merry christmas 😉

      ------------------
      (url="http://"http://www.ledorax.da.ru")Ledorax Land(/url)

      (url="http://"http://http://www.freewebs.com/ledorax/bloodychristmas.txt")Bloody christmas(/url)

    • Well... You know how in PoG you only get experience when there aren't any NPCs nearby (i.e. if there are two NPCs attacking you, you have to kill both before being awarded experience). This is termed "Encounter in progress" and (I believe) is either 1 or 0. It is a built in variable and should occur when an enemy NPC is on the screen (I think. It might be that they have to be a certain number of tiles away, not sure of the exact mechanics). You can use this to have an NPC hurl insults at the player, however, note that "Encounter in Progress" will only tell you that you are fighting an NPC, not which one you're fighting.

      ------------------
      CI-I@()s
      (url="http://"http://www.world-of-cha0s.hostrocket.com")The Homepage of Cha0s(/url)

    • Quote

      Originally posted by CI-Ia0s:
      **Well... You know how in PoG you only get experience when there aren't any NPCs nearby (i.e. if there are two NPCs attacking you, you have to kill both before being awarded experience). This is termed "Encounter in progress" and (I believe) is either 1 or 0. It is a built in variable and should occur when an enemy NPC is on the screen (I think. It might be that they have to be a certain number of tiles away, not sure of the exact mechanics). You can use this to have an NPC hurl insults at the player, however, note that "Encounter in Progress" will only tell you that you are fighting an NPC, not which one you're fighting.

      **

      Thanks, but that wouldn't work since I dont only have people in the game :frown:

      ------------------
      (url="http://"http://www.ledorax.da.ru")Ledorax Land(/url)

      (url="http://"http://http://www.freewebs.com/ledorax/bloodychristmas.txt")Bloody christmas(/url)

    • I don't know if this would help, but perhaps you could make the NPC -- oh man, what's it called -- it's that circle in the animation window that can be set small or huge that allows the NPC and Player to make contact. Anyway, you could make that circle very large, make the NPC passive. When the Player sees the circle or makes contact, you can place an event in the NPC window under Player Contact to make the NPC scream at him.

      Can an NPC's line of sight be manipulated so that the NPC can see the Player? Perhaps if you made the NPC an enemy, when the NPC sees the Player and goes after him physically, you could change the NPC into a different NPC that screams at the Player. I don't know if this will work. Pprrroooobbbaaaabbbbllllyyyyy not.

      Perhaps my 1˘ of meaningful help here will stimulate others' thoughts. Sorry.

      (edit) Hey, you can make the animation for the enemy NPC under "attack" to scream at the Player. If there's a way you can freeze the NPC in place. Close access tiles around the NPC?

      ------------------
      -- Debra
      Danillitphil Productions
      (url="http://"http://www.danillitphil.com/graphics/index.html")www.danillitphil.com(/url)

      (This message has been edited by Debra (edited 12-19-2003).)

    • If he made the "thing in the animation window" (collision sphere/circle) really really large, he wouldn't be able to move smoothly and he'd always be bumping into NPCs... In addition, I think player contact is set off when the player hits the NPC (as in attacking, not bumping).

      ------------------
      CI-I@()s
      (url="http://"http://www.world-of-cha0s.hostrocket.com")The Homepage of Cha0s(/url)

    • Another way is to give the NCP no map movement, then place tile events with the scream sound or dialog that you want. Works the same way (sort of). Good luck!

      ------------------
      (url="http://"http://www.lordofthecows.com/ambrosiamemberstonight/")Ambrosia Members Tonight!(/url) | (url="http://"http://www.lordofthecows.com/music/board_members/spamguy/moderatorsong.mp3")The Moderator Song(/url) / (url="http://"http://www.lordofthecows.com/music/board_members/evula/evula.mp3")EVula(/url) / (url="http://"http://www.evula.com/")The real EVula.com(/url)
      Jingle Bells, Windoze smells, (url="http://"http://www.ambrosiasw.com/webboard/Forum61/HTML/001202.html")The Blue Mushroom Pub(/url) rocks (all 25+ pages worth)!
      How are you gentlemen!! (url="http://"http://www.allyourbasearebelongtous.com")All your base are belong to us!(/url) You are on ze way to destruction. You will have no chance to survive make your time...Mwa ha ha ha...
      -ZeroWing CATS, (url="http://"http://www.planettribes.com/allyourbase/")All your Base(/url)

    • I think LifeKnight's response is the closest so far. Here's how I would do it:
      NPC is passive with a very limited sphere of movement. The surrounding tiles trigger the "Yell_Event" which can either bring up a dialogue or call up an audible sound bit. If you want the player to fight the NPC, the next closest line of tiles call for the "Fight_Event" which replaces the passive NPC with his look-alike hostile counterpart.

      If the player runs away from the NPC after he is yelled at, the NPC remains docile but if the player continues to approach, the NPC gets nasty.

      Edit: typo
      ------------------
      My Doctor said I was having too much wine, women, and song - so I gave up singing because 2 out of 3 is not so bad.
      The (url="http://"http://www.evula.org/rduck/")Kingdom of Garendall(/url) sectional map is easily printed from gif format pages.
      (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/damsels.sit?path=pog/addons&file;=damselsV1.1.sit")Damsels in Distress(/url) - A plugin for PoG. (url="http://"http://www.evula.org/rduck/RD-DEL.jpg")RD-DEL(/url)

      (This message has been edited by Rubber Ducky (edited 12-20-2003).)

    • Event tiles would work. So would hostile NPCs with yelling animations. Give them ranged weapons that can't hit(hit condition=gold is greater than gold), make them Range Only AI. When the player approaches within the NPC's LOS, the NPC will:
      -Walk toward the player until it is within range of its "weapon".
      -"Fire" (yell) from that range as often as it is set to.
      -When the player leaves its LOS, it goes back to what it was doing, assuming it can't keep up with the player's movement.
      The problem with this is you can't talk to hostile NPCs. You'd have to think of a clever way of switching them out if you wanted the player to be able to speak to them. The advantage is the player actually feels like the NPC is reacting to him, rather than the more mechanical event tile method.

      You can also use stamps and event tiles. Or looping stamps that check the player's coordinates if you want to cut down on the event tiles.

      ------------------
      (url="http://"http://home.earthlink.net/~isthaq/darktides")Dark Tides: Renegade Heroes(/url)

    • Thanks for the help, since there seem to be no way to check if they are on the same screen, I'll just do it debra's way (animation stuff). With some random action things I guess it could work pretty good 😉

      Thanks again...

      ------------------
      (url="http://"http://www.ledorax.da.ru")Ledorax Land(/url)

      (url="http://"http://http://www.freewebs.com/ledorax/bloodychristmas.txt")Bloody christmas(/url)

    • You might want to consider placing the yelling in the attack animation frame itself.

      (edit) HEY! This is my 500th post!!! Yelling. Attacking. Typical. 🙂

      (edit again) Well it WAS my 500th post. Couldn't shutup.

      ------------------
      -- Debra
      Danillitphil Productions
      (url="http://"http://www.danillitphil.com/graphics/index.html")www.danillitphil.com(/url)

      (This message has been edited by Debra (edited 12-20-2003).)

      (This message has been edited by Debra (edited 12-20-2003).)

    • I'd go with the LOS with passive spells that have a damage value of 0
      and target the caster
      this could for instance be used to trigger sirens that last for 30 seconds once tripped ( 15 rounds ) ( like Metal Gear's Radar System )
      or just in general allow for random ambience

      albeit all the other systems listed in this post are valid, this requires the least amount of work and will render the best results.

      at one point it was my intent to have a single invisible npc trail the player at all times in my game, executing various methods, such a thing would be the closest thing to a scripting language inside of CGE, true AI :: thunder clap :: SENTIENCE ...mu hu har...but then CGE up and died.

      ----
      the truth of the matter the real purpose of programming/scripting is for actions/events/processes to be carried out without direct manipulation of the implements, Automation. :: Wax Rhetoric :: So would an Automaton be an appropriate vessel for automationż

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

      ... ** Big O..ACTION!**

      { edit : added segment on the purpose of programming }

      (This message has been edited by ellrx (edited 12-20-2003).)