[SOLVED] Dialogue Without Character Sprite?

Started by EnnarGames, Sat 02/04/2022 03:33:23

Previous topic - Next topic

EnnarGames

Hey everyone!!

So one of the games I’m working on involves utilizing an artist with a specific style…

Long story short, I will be experimenting with NPC’s being characters which are drawn-in to backgrounds he would create for the game and was wondering if there’s a way to still create and run dialogue for these “characters”, even though they won’t be sprites in the game.

First and foremost, can you rig a conversation when there isn’t another sprite?
If so, can you then change the position of that sprite-less text so that it appears over the spot the character takes up in the background?

The only thing I could think would be to load a sprite that is just completely pink visually, making it technically invisible, and then positioning it over the spot in the background the character takes up…

What do you guys think?? Sorry if this makes no sense.

Thank you!!
“Art is an object riddled with sharp edges that can cut you.  You can pound all those edges away and make it smooth and make it safe, but what you’re left with is just a shapeless blob.  It’s safe and it’s smooth, but it’s uninteresting.” Ron Gilbert

AndreasBlack

#1
Quote from: hobbesboi on Sat 02/04/2022 03:33:23
Hey everyone!!

So one of the games I’m working on involves utilizing an artist with a specific style…

Long story short, I will be experimenting with NPC’s being characters which are drawn-in to backgrounds he would create for the game and was wondering if there’s a way to still create and run dialogue for these “characters”, even though they won’t be sprites in the game.

First and foremost, can you rig a conversation when there isn’t another sprite?
If so, can you then change the position of that sprite-less text so that it appears over the spot the character takes up in the background?

The only thing I could think would be to load a sprite that is just completely pink visually, making it technically invisible, and then positioning it over the spot in the background the character takes up…

What do you guys think?? Sorry if this makes no sense.

Thank you!!

Sounds like all you need to do is try it. (laugh) And yes, it works. I've done it in my "computer room" in my game. You don't need to use a pinksprite i did that also in the early days as a complete n00b. All you need to do is this.

Code: ags


function room_Load(){


cCharactersname.Transparency=100;

}

 //and make sure the character is none clickable. If that's what you want. And add a hotspot instead at the same place as the character and inside of that hotspot you add  



function hCharactershotspot_AnyClick()
{

dYourdialogforthecharacter.Start();


}


Good Luck!

Khris

You can also position a character outside the screen (cNpc.y = -1;) and use SayAt().

If these background characters are supposed to make the mouse light up, I'd grab a single sprite from the background and create a view with that sprite in all four loops. Then use that view as normal and talking view and place the character as usual. This also has the benefit of being able to give the character any shape (again, if the interface requires them to appear as active areas).

heltenjon

I've done exactly this in my four games (Scales Training Game, Halloween with an Unexpected Guest, Getting the Picture and Prep Time.

The npcs don't have to be in the room at all, so there's no need for invisible sprites unless you want them to move around later on. I used SayAt() like Khris suggests and positioned the dialogue lines above the character in question. If you want to do this in the dialogue, you just need to indent the line, then use the SayAt() command instead of the usual dialogue script. (The dialogue will have to take place in the room where these are the correct coordinates, though.)

I made the characters in the background hotspots instead of character sprites. If you need code examples for any of this, just let me know.

EnnarGames

You guys are all awesome!! Thank you so much!!  :)
“Art is an object riddled with sharp edges that can cut you.  You can pound all those edges away and make it smooth and make it safe, but what you’re left with is just a shapeless blob.  It’s safe and it’s smooth, but it’s uninteresting.” Ron Gilbert

SMF spam blocked by CleanTalk