Jump to content


Photo
- - - - -

Dungeon Siege II Dialog


  • Please log in to reply
10 replies to this topic

#1 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1830 posts
  • Version:GM8.1

Posted 24 October 2010 - 01:04 PM

  • Title: Dungeon Siege II Dialog Example
  • Description: This is an example of a dialog window based on the RPG game Dungeon Siege II.
  • GM Version: 8
  • Registered: No
  • File Type: gmk
  • File Size: 74 kb
  • File Link: http://www.host-a.ne...ge 2 dialog.gmk


Please leave comments if you download. Feedback is as always appreciated :)
If you use this in your game then please credit Orestis Pavlides since I'm using this project for a contest.

Thank you very much :)

Edited by loverock125, 20 November 2010 - 11:11 PM.

  • 1

#2 fantasy-solid

fantasy-solid

    GMC Member

  • New Member
  • 4 posts

Posted 02 November 2010 - 08:24 PM

good, but im not sure if is usefull for me
  • 0

#3 Sektor_Z

Sektor_Z

    GMC Member

  • GMC Member
  • 1671 posts

Posted 20 November 2010 - 10:29 PM

This gives me a kernel32.dll-related error of some sort, so I couldn't see it in action.
I looked into the code though and it looks pretty promising and simple to use, I just wish I knew what the problem was...
  • 0

#4 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1830 posts
  • Version:GM8.1

Posted 20 November 2010 - 10:52 PM

This gives me a kernel32.dll-related error of some sort, so I couldn't see it in action.
I looked into the code though and it looks pretty promising and simple to use, I just wish I knew what the problem was...



Thank you for posting

I'm very sorry for the error. I have no idea what's causing this error.
I hope that someone else in this forum will post what could be related with the problem.
  • 0

#5 Sektor_Z

Sektor_Z

    GMC Member

  • GMC Member
  • 1671 posts

Posted 21 November 2010 - 10:49 AM

The error wasn't caused by your code at all, it was a whole different problem that's now resolved.

But while testing this I encountered another error, when enabling "Treat uninitialized variables as value 0",
an error related to the following code in the "Draw" action of the NPC object, shows up about this code:

if answer[num,0] != "" then

Saying it cannot compare arguments here. Can you try enabling "Treat uninitialized variables as value 0" yourself and see if there's a way to fix that, I tried already using similar code but it didn't work well, I guess I still don't exactly know your code. Maybe you can help?

This could be really useful to me if we manage to make it working with the "Treat uninitialized variables as value 0" enabled...
  • 0

#6 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1830 posts
  • Version:GM8.1

Posted 21 November 2010 - 03:24 PM

The error wasn't caused by your code at all, it was a whole different problem that's now resolved.

But while testing this I encountered another error, when enabling "Treat uninitialized variables as value 0",
an error related to the following code in the "Draw" action of the NPC object, shows up about this code:

if answer[num,0] != "" then

Saying it cannot compare arguments here. Can you try enabling "Treat uninitialized variables as value 0" yourself and see if there's a way to fix that, I tried already using similar code but it didn't work well, I guess I still don't exactly know your code. Maybe you can help?

This could be really useful to me if we manage to make it working with the "Treat uninitialized variables as value 0" enabled...


I'm not sure what was causing the error but I've found a way to fix it.

In the draw event of the dialog replace this part:

repeat(global.max_answers)
{
if answer[num,0]!="" then


with this:

repeat(global.max_answers)
{
if is_string(answer[num,0])
if answer[num,0]!="" then



Basically the difference is that it will check if the answer[num,0] is a string. (Since for a reason when you enable "Treat uninitialized variables as value 0"
an answer has the value of 0.
  • 0

#7 Sektor_Z

Sektor_Z

    GMC Member

  • GMC Member
  • 1671 posts

Posted 21 November 2010 - 08:45 PM

This GM-related issue has been giving me alot of trouble lately. Thanks for figuring out an alternative way!
Anyways, your example is really helpful and easy to understand. Thanks for sharing it, I will give you credit and notify you if I use it (which I will, probably).

Edited by Sektor_Z, 21 November 2010 - 08:46 PM.

  • 0

#8 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Retired Staff
  • 15729 posts
  • Version:GM:Studio

Posted 14 July 2011 - 06:17 PM

WOW
  • 0

#9 tomduck97

tomduck97

    GMC Member

  • New Member
  • 1 posts

Posted 10 August 2011 - 05:38 PM

This example is really great!

Although it could use some explanatation, because there are many scripts!
  • 0

#10 Markonicus

Markonicus

    GMC Member

  • GMC Member
  • 123 posts

Posted 14 October 2011 - 01:07 PM

This is a great example, really useful, but would it be possible to make the dialog images animated. As is is they are stationary even if the sprite itself is animated.
It would be best if it could be animate while the text is being typed and then stop the animation once it is done typing, but any kind of animation would be good.
  • 0

#11 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1830 posts
  • Version:GM8.1

Posted 22 October 2011 - 04:31 AM

This is a great example, really useful, but would it be possible to make the dialog images animated. As is is they are stationary even if the sprite itself is animated.
It would be best if it could be animate while the text is being typed and then stop the animation once it is done typing, but any kind of animation would be good.


You can animate the portrait sprites by replacing the lines 9-17 in the draw event of the dialog to this:

if portrait[0,0]!=0 then
{
draw_sprite(portrait[0,0],-1,_x+portrait[0,1],_y+portrait[0,2])
}

if portrait[1,0]!=0 then
{
draw_sprite(portrait[1,0],-1,_x+portrait[1,1],_y+portrait[1,2])
}

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users