Conversation with a character in game.

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Conversation with a character in game.

Postby mercedes » Fri Aug 01, 2008 2:55 am

Hi there..when i say Character I mean a "still" one..not a sprite..Basically clicking on the character will start this conversation. I have to say that this took me foreverrr...lol..to figure out~

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...:P

I didn't post this in a tutorial section..cause I wasn't sure if it was one or not..:?
Last edited by mercedes on Fri Aug 01, 2008 10:32 pm, edited 2 times in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Candle » Fri Aug 01, 2008 3:13 am

To change the color of the text displayed at the bottom of the screen, use the following code:
MessageObject.ForeColor = RGB(0,0,255)

http://www.adventuremaker.com/help/vbscript_objects.htm
Please don't PM me questions, ask here in the forums!
``````````````
Between grand theft and a legal fee, there only stands a law degree.
User avatar
Candle
Administrator
 
Posts: 3055
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby Lyberodoggy » Fri Aug 01, 2008 10:38 am

Mercedes you need more "end if"s
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Fri Aug 01, 2008 9:56 pm

I don't know about that Kiddo...:?

They are only actions..That statement used alone..doesn't even end with [END if] I think because it can be used to carry on and on..There was no ELSE involved..NO other terms of statement..just actions..THe only reason why there is one there now..is because of upper if statement..and I used an ELSE. Thats what I think anyway.....not sure..but common sense tells me that..not experience, .. Either way..it works.:P


Candle;

Yes, but that changed the color of the whole thing..was hoping I could change the color of each message..basically make mine blue..his red..do you know what I mean..don't think it can be done though...:( I have thought of another way of identifying him and me..or player and him..I should say..:P Have yet to try it..And no doubt will work on that part for daayyss...LOL..


Thanks for Response..~

Peace
Adieux~
Last edited by mercedes on Fri Aug 01, 2008 11:21 pm, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby ShadowHunter » Fri Aug 01, 2008 10:13 pm

Hi,

If you use tabs in your coding it makes more sense... your snipped has all the END IF's it need :D

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


As long as an IF does not have an else it does not need a closing END IF...

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby Jaked » Fri Aug 01, 2008 10:16 pm

Sadly I'm not using AMFull, but I do have a full 3.6 AM, so a long time ago, I used a lot of VBScript! So I used a video of conversation of a (character) talking, mouth closed, talking, closed, end. With Poser 4.
My sig changes more often than Doctor Who (see your national BBC channel) regenarates into new melancholy actors. Oh look, Matt Smith! Gerard Butler! Colin Mochrie! That wolf from Twilight: New Moon!
User avatar
Jaked
Code Master
 
Posts: 729
Joined: Wed Jun 25, 2008 4:26 am


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests