Jump to content


Photo
- - - - -

Textbox/dialogue Example [link REALLY fixed]


  • Please log in to reply
211 replies to this topic

#201 BruceCollins

BruceCollins

    GMC Member

  • GMC Member
  • 29 posts
  • Version:GM8

Posted 27 November 2011 - 05:09 PM

I'm planning to add this to one of my games, but I'm wondering how I can have it so that it only fills up the view, and not the whole room?


Hello ah2190,
Look at your textbox code and find the user variables section. Replace variable destinations as you see below. Depending on the size you have your views set to, you may need to adjust the variables "y1" and "y2".


// USER VARIABLES /////////////////////////

x1 = view_xport; // x1 :: Left x position of textbox Adjusts textbox to left.
y1 = view_yport+360; // y1 :: Top-left y position of textbox Adjusts the top.
x2 = view_wport; // x2 :: Right x position of textbox Adjusts textbox to right.
y2 = view_hport-1; // y2 :: Bottom y position of textbox Adjusts the bottom.

Hope this helps. :D~
  • 0

#202 Xeodisc Games

Xeodisc Games

    GMC Member

  • New Member
  • 61 posts

Posted 07 December 2011 - 08:49 PM

Has anyone tried using this script in HTML5? It works when using the Windows option but crashes with no errors when in HTML5. It would be great to see an update of this script as it is one of the best in the community.
  • 0

#203 JetstreamOrbitars

JetstreamOrbitars

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8

Posted 03 May 2012 - 04:48 AM

I tried this script, but for some reason, the text box fills the whole screen and does not show any text. It even goes off-screen!

Here are the details:

-My views are set to 240 X 320, though the rooms themselves are much bigger multiples of 16.
-I am using a long sprite from Mario Kart DS as a text box.
-User variables:
x1 = view_xport - 1240;                 // x1            :: Left x position of textbox
y1 = view_yport - 480;                 // y1            :: Top-left y position of textbox
x2 = room_width - 1240;           // x2            :: Right x position of textbox
y2 = room_height - 210;         // y2            :: Bottom y position of textbox

I am not sure what is the cause of the problem.
  • 0

#204 Blue Leader

Blue Leader

    GMC Member

  • New Member
  • 467 posts

Posted 10 May 2012 - 09:51 PM

I tried this script, but for some reason, the text box fills the whole screen and does not show any text. It even goes off-screen!

Here are the details:

-My views are set to 240 X 320, though the rooms themselves are much bigger multiples of 16.
-I am using a long sprite from Mario Kart DS as a text box.
-User variables:

x1 = view_xport - 1240;                 // x1            :: Left x position of textbox
y1 = view_yport - 480;                 // y1            :: Top-left y position of textbox
x2 = room_width - 1240;           // x2            :: Right x position of textbox
y2 = room_height - 210;         // y2            :: Bottom y position of textbox

I am not sure what is the cause of the problem.

You just need to play around with those variables in the script. That's happened to me a few times... Just try playing around with the numbers (decreasing them I believe) until it appears correctly.
  • 0

#205 Xeodisc Games

Xeodisc Games

    GMC Member

  • New Member
  • 61 posts

Posted 25 June 2012 - 05:20 AM

Has anyone tried to fix this for GM studio?
  • 0

#206 ironkladgames

ironkladgames

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 31 July 2012 - 11:20 PM

This is an incredible tutorial/example for message boxes - very professional, and just an FYI to other users, it works with the current version of GM8.1

Thanks for your effort J factor

cheers
  • 0

#207 AppleBurner

AppleBurner

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8

Posted 14 October 2012 - 05:43 PM

I don't know if anyone still pays attention to this but I don't understand how to influence what text appears in the box. Any help would be appreciated.
  • 0

#208 2001IAS OG

2001IAS OG

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8.1

Posted 25 January 2013 - 09:09 PM

Worked for me! I Just fixed some stuff, added some arguments, and TA-DA! Now i'm using it in the 8.1 Updated Version! :D
I will give you some credits in my game. Thanks for posting this!
  • 0

#209 Wiiboy4ever

Wiiboy4ever

    GMC Member

  • GMC Member
  • 96 posts

Posted 30 January 2013 - 12:16 AM

Wow, this is awesome!

One thing though, is there a way that you can use a font that's NOT a sprite font? I prefer to use the resource font, and the font that I'd like to use isn't available in gif form anyway....
also, you should update it to let the user choose if he wants to freeze the game or not. This really gets in the way of people that already have cutscene seqeunces in their games.

Edited by Wiiboy4ever, 10 February 2013 - 06:05 PM.

  • 0

#210 BluishMicrobe

BluishMicrobe

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8.1

Posted 01 February 2013 - 04:08 AM

Ok I hope to god this lil thread isnt dead...Any ways *Noob question* how to I make a enter key press even (if that makes sense) for example when my sprite collides with a box and *if* i press the enter key it opens up the dialog box?? (any body wanna write up a lil code for me :laugh: haha)

Also how do make the Yes and no dialog thingys !?

My Game is due in a couple days so umm.. please for the love of god PM me back :sweat:
  • 0

#211 Boysano

Boysano

    GMS Pro Member

  • GMC Member
  • 133 posts
  • Version:Unknown

Posted 20 February 2013 - 04:20 PM

This is really helpful and we should revive it for GMS and GMS HTML5
  • 0

#212 Thingo

Thingo

    GMC Member

  • GMC Member
  • 458 posts

Posted 08 May 2013 - 09:28 PM

Thanks for the upload. This should prove quite helpful.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users