Dialogue System Problem [Solved]

Ok, so what I have in my .blend file is 2 cubes, that are suppose to say 2 different things… They are both named Bob right know, but this is just a test.

I made a script that gets the object that a the ray hit from the bottom cube, and then gets what the character is suppose to say, then it gets a property in the Text object where it the Text actually shows up… I copy the dialogue into a property to hold it in, then when the dialogue script is activated it shows whatever the property has it…

So, your the bottom blue cube, you press T, it gets the object that the ray hit, then gets the property speech, and copies it to another property to hold it. This property is in the Text object where the dialogue is going to be shown with a script that Andrew made… This object has a property change sensor that if hold property in the Text object changes to activate the init part of a script, then if you press T it goes through the changes…

That’s what I want to do, the problem is that when I press T to get the ray hit object, it doesn’t copy it to the hold property and it’s weird if I change somethings in it, it WORKS, but it doesn’t show up in the Text… You’ll understand more with the .blend file. Sorry for the bad explanation.


New better explanation:

bump.

Ok, I’ll give another explaination with a new .blend with the texture packed.

What this is suppose to do is:
When I press T in front of a the top blue cubes, it shows dialogue where the black box is. And if your press T it goes to the next page of dialogue if the box has more to say. You are the bottom blue cube.

The problem is that when I press T, nothing happens… I made a script for the bottom cube, that when you press T, it gets the object that the ray hit and then copy the dialouge property over to another property in a text object to show the dialogue, so the speech.py script (That Andrew-101 made Thanks!), Splits it up into words 4 lines and pages… But when I press T nothing happens…

I really need someone to tell me whats wrong or to fix it for me please!

Attachments

untitled.blend (184 KB)

Fixed I think.

The main reason it didn’t work, is because the Text objects use the prop Text, and you had speech updated, so all I did was copy the speech prop and put it in the Text prop.
Hope you understand…

Note: you might have to reload the text texture, because you forgot the pack it.

Edit: you have to press T to update. I’m pretty busy right now, so… Maybe later I’ll take a look at it.

Attachments

untitled.blend (167 KB)

Thanks, but I don’t think it’s working because Andrew’s script is suppose to make the text 30 words per line 4 lines per page, but your fix wasn’t fixed that :\

Thanks anyways :slight_smile: I really appreiciate your help

bump.

Ok, I’ll give another explaination with a new .blend with the texture packed.

What this is suppose to do is:
When I press T in front of a the top blue cubes, it shows dialogue where the black box is. And if your press T it goes to the next page of dialogue if the box has more to say. You are the bottom blue cube.

The problem is that when I press T, nothing happens… I made a script for the bottom cube, that when you press T, it gets the object that the ray hit and then copy the dialouge property over to another property in a text object to show the dialogue, so the speech.py script (That Andrew-101 made Thanks!), Splits it up into words 4 lines and pages… But when I press T nothing happens…

I really need someone to tell me whats wrong or to fix it for me please!

THanks for you help blenderartists! Here’s the .blend and I think it’s packed :smiley:

Attachments

untitled.blend (184 KB)

bump doesn’t anybody know how to fix this?

Hey Linkxgl,

Ok, I fixed the problem you’ve had, the tap wasn’t working I’m not sure why though 0.o All I did was take off the tap on the T on the script you had and disabled it, then I made it so when there are not more pages left the number of pages is -1 that seems to work well…

Wow sounds like nobody helped you out except for me!

Ok the .blend is in the attachments, good luck on your game!

Cheers!
Linkxgl

That’s what should of happened but I guess I had to do it myself… :frowning: Thanks to Excalibur for the help :smiley: I really appreciate it :slight_smile:

Attachments

untitled.blend (184 KB)