frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Better NPCs?

I'm adding the first NPC to my game, but it's not really smart. Yes, it knows how to use a gun, a vending machine, can change the channel on the radio, and has unique dialogue. But, it can be better. When the NPC gets hit by a bullet, it always goes to the player in violence simply because that's the most likely thing to shoot them. BUT, what if he gets shot by say, MR. HOUSE, or steps on a mine? Basically, I want the NPC to attack whatever attacked it instead of immediately assuming you did it...
If you guys feel like that's too easy and I'm just stupid, (which I am so I wouldn't be surprised) then I have a more challenging problem.
Is there a way to give the NPC 100 percent unique in it's dialogue? Like I can give it canvases, so say;
(Sentence starters:
Hey,
Hi,
Hey, stranger,

Sentence enders:
how ya' doing?
Why are you here?
)
Basically, I want it to have a random text generator from the quotes I give it...
Is either of these possible?

Comments

  • U would have to make a different NPC for each different dialogue
  • I can't do that....
    I play on the free version, so I have limited sprites, and just for the dialogue, it would take up the rest of my sprites...
    But thanks!
    Is there a way to do it with randoms and alerts?
  • There is an easy way to do this. First, copy, for example bullet, so your player shoots one kind and Mr. Mouse shoots another. For the dialogue, do a Randomized block connected to filters. If the Randomizer lands on 1, he says hi. If 2, Hey, ect.
  • The friend wizard in This Game
  • Okay. I already did that design for the dialogue. But for the bullets, I would do that, but I play on the free version, so I can't do that. I'm already fully decked out on my sprites...
  • Oh. One advanced way to do it is have two bullets, each the same type but has a different name. The bullets will bee "Summoned" and then shot. Otherwise, i would recommend buying indie.
  • edited December 2018
    This is a sub-optimal workaround for the sprites issue, but if you have a bunch of blocks with the same function, just different appearances, you can make one block with all of those textures in an animation and have another block that will send messages to different objects of that type telling them what frame to use. There's sort of an example of that in this game with the grass and stone textures although you'll have to message specific objects with specific numbers instead of using a randomizer. This might not work in your game since from the fact that you've used all your sprites, this is probably a very large game and thus it's not worth it to do this for every single block. So if you don't want to pay for anything, I would just cut down on some objects. :confused:
  • Another way around sprite issues is by using names to all the clones and setting behaviors specificly to the name of the type of sprite. The message and mailbox would be useful for this.
    This is also a good way to have several of the same key for several doors in 1 level, like a sequence.
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch