(RESOLVED)Speech and Hotspots

Started by Anpiel, Sun 23/11/2014 04:33:20

Previous topic - Next topic

Anpiel

I am trying to have a conversation be triggered by walking over a hot spot. As of now the conversation is in a continuous loop and I cannot walk off of it. I thought that a stop in the conversation code would prevent that. Any thoughts?
Angels they fell first but I'm still here

Mandle

#1
I'm guessing that as soon as the conversation stops the game re-detects the hotspot and starts the conversation all over again?

I think you need to deactivate the hotspot at the end of the conversation.

Of course other solutions include setting a bool variable like HasConvRun or whatever, setting the initial value to "false" and then to "true" after the conversation has finished. You also need to put a condition on the conversation starting only if HasConvRun is "false". You could also set the conversation to be done only once.

But I think turning off the hotspot is the simplest way.

Anpiel

What would turning the hot spot off after a conversation look like in code?
Angels they fell first but I'm still here

Mandle

Quote from: Anpiel on Sun 23/11/2014 05:08:54
What would turning the hot spot off after a conversation look like in code?

I totally understand your reluctance to open the forbidden tome known as the Necronomi AGS Online Manual and delve into its eldritch horrors so I will do it for you, despite fearing the resulting effects upon my sanity:

(1) You open the online maual in the link above and then you click on "Scripting" in the side menu.

(2) You scroll down on that same side-bar until you see: "Hotspot functions and properties"

(3) Then you look at "Enabled property (hotspot)" and it will say something like:

(just in case you want to skip ahead, but I promise you that reading the Online Manual will really help in most cases)

Spoiler
Code: ags
hBrownTree.Enabled = false;
[close]

I'm sorry for being a bit obtuse with this help but I also found the exact same kind of help to be very useful when I was new here...

Anpiel

This is very helpful. The bluntness is appreciated and I love the humor!
Angels they fell first but I'm still here

Mandle

Quote from: Anpiel on Sun 23/11/2014 09:30:33
This is very helpful. The bluntness is appreciated and I love the humor!

Yeah, sorry for a bit of the bluntness...

It's like when your Dad tells you the story of the dude that needed to eat and the guy taught him how to fish instead of giving him a fish...

And when you hear that you're totally like "Man...that guy was a dick to him...He was so hungry..." but then you can see the hungry guy a couple years down the line teaching the exact same thing in the exact same way to the next dude...

Monsieur OUXX

Additionnally to what Mandle said (which is the most likely cause), sometimes you're stuck in a conversation just because you forgot to add the "stop" command inside of the dialog editor. That's because the game automatically plays the last available dialog option (when the player has said all other options before), and as soon as it's finished, it automatically plays it again. And again. Etc.
 

SMF spam blocked by CleanTalk