remove hotspot not disable

Started by Candle, Thu 07/07/2005 04:13:55

Previous topic - Next topic

Candle

I found that if you have a hotspot and then put one over it you can't get at the one below .
So I had to split the doorknob in half and then use the disable one so the other one would ..
I have a dog watching a door and if you click on the doorknob before you feed him he bites you .
So had to do the half and half with the two DisableHotspot(3); .one is able while the other is not .

Gilbert

That's how the areas works, areas cannot overlap, bear in mind about that.

Candle

Ya that came to me when I couldn't get it to work . lol

Ashen

Why did you need to use two hotspots for that? You could just use a condition:

Code: ags

//pseudocode
if (dogisfed == 0) {
  //Bite
}
else {
  //Open door
}


Or have I misread your post?
I know what you're thinking ... Don't think that.

Candle

How does the "if dog is fed" fit into it ?

Ashen

Quoteif you click on the doorknob before you feed him he bites you

I read it as one hotspot triggered the 'Dog bites you' reaction, then when you feed the dog it disables that hotspot, and enables the one that opens the door. Although, as I said, I might've misunderstood the original post - I don't quite get why you needed, or thought you needed, two overlapping hotspots.

So, that code would go in the hotspot interaction, and isdogfed would be an int  (or maybe a bool if you're using 2.7) that gets changed when you feed the dog, to make the second interaction work. However, that was only psuedocode - if you tried to use it exactly as is it wouldn't work, e.g. you need to (at least) declare int dogisfed;.
I know what you're thinking ... Don't think that.

Candle

Oh man way above my head with that now .

Ashen

Which bit? It's not actually that advanced, I'm probably just not explaining myself very well.

Start with the basics: Was I right in my guess as to whay you wanted 2 hotspots (one for before the dog was fed, one for after)?
I know what you're thinking ... Don't think that.

Candle

#8
Yes , I have it like this .
Dog is by door . you have to give the dog" Treat inv #8 that removes the hotspot #2 and enables #1
So hotspot 1 takes you to room 7
The give dog treat is done in his  DOG character Interaction .
I guess I'm happy the way I have it now as it works and thats all that matters to me .

monkey0506

Question:

Couldn't you just set a global variable depending on whether the player gave the dog the treat or not, and then test it and base the interaction of a single hotspot upon the value of said global variable?

It seems a lot simpler than using two hotspots and having to enable/disable them and what-not.

Just a question/suggestion...

Ashen

Which is exactly what I meant, I just didn't put it as clearly.
I know what you're thinking ... Don't think that.

monkey0506

Oh, I thought that you were trying to help him do it his way... Once again...me when I'm tired.  I didn't go to sleep last night.  I was too concerned about one of my friends.  But I still found time to try and be helpful...not very successfully.

Ashen

Well, if it actually helps to sort out the problem - rather than confusing things further like I did - that seems quite successfull. I wasn't complaining about you saying the same thing as me, just pointing out that you said it better.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk