Put a hotspot on your character..in this case its a Cow...Make it so it has the cursor of the "Mouth" if you want.
Put this in the Advanced Tab
- Code: Select all
If Grass_given =1 Then
Action.Message "Thanks there's an apple over there you can have!"
apple_taken=1
Else
Grass_given = 0
cow_clicked = cow_clicked -1
If cow_clicked = -1 Then Action.Message "Hey Cow,how are you?"
If cow_clicked = -2 Then Action.Message "Fine"
If cow_clicked = -3 Then Action.Message "Have you anything for me?"
If cow_clicked = -4 Then Action.Message "Yes, but you must give me something first."
If cow_clicked = -5 Then cow_clicked = 0
End If
Also make a Variable called [Cow_spoken_too] is what I did..in the cow hotspot..Under Variable Tab.
I made an additional hotspot on the [grass] somewhere else--Made it only Visible once the [cow_spoken_too] became 1..Basically once you clicked on the cow.
Then in the Variable Tab of the Manage Inventory Items..make another Variable called [Grass_given]..
How this works is the user will keep getting the messages you see up there every time they click on the cow...until they give him the grass..Then he gives up the item and says Thanks!~
But the way this works..is you see nothing of the thank you message until the click him again..Just like those frustrating point and click games..where you think nothing happened..but then go back and click it and get the message..Not sure if anyone else knows of this..but I do..lol..But if you want..you can put noise to let the user know..something happened.
If Someone knows a way of changing each message so they appear a different color..that would be cool..Working on it now..but with no results..it changes them all the same color..
Pretty proud of myself .. Something so simple can give you such a hard time...
I didn't post this in a tutorial section..cause I wasn't sure if it was one or not..