Jump to content


Photo

Type Writer Text Example Almost No Code Needed


  • This topic is locked This topic is locked
1 reply to this topic

#1 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 1506 posts
  • Version:GM:Studio

Posted 20 April 2014 - 09:50 AM

Do you want to learn how to do rpg scroller text, (and/or) mugshots with almost no code needed, well i can teach you, here today and now.

First we will need a sprite for the mugshot and one for the dialogue box make another sprite for this of the same width and make sure it's the same height then the same color

then make the same exact amount of frames for it to go subtracting parts from the top left and so on going down a layer until you reach the bottom right and a entirely empty image on the last frame

in the draw event of the message(first make sure you cut the sprite down 54 pixels in width and 16 pixels in height)

draw_sprite(self.x,self.y,0,spr_dialogue_box)

draw_sprite(self.x+2,self.y+2,0,spr_mugshot)

draw_text(self.x+54,self.y+16,'Hello welcome to the game dear player#blah, blah, blah#blah, etc')

if image_index<428

{

// desired dialogue box's width minus 54 pixels and height minus 16 pixels (lets just say the width of the area the message box is inside is 320 and the height is 108)

draw_sprite(self.x+54,self.y,-1,s_sdialogue_box_subpart_overlayer)

}

if image_index==428

{

// desired dialogue box's width minus 54 pixels and height minus 16 pixels (lets just say the width of the area the message box is inside is 320 and the height is 108)

// stop the animation and perform the game designer's desired event

draw_sprite(self.x+54,self.y,428,s_sdialogue_box_subpart_overlayer)

image_speed=0

}

in event of key pressed a:

// check if were done animating the type writing before destroying the message box object

if image_index==428

{

instance_destroy()

}

ok one more event create:

image_speed=1


Edited by mrsmes, 20 April 2014 - 10:25 AM.

  • 0

Assuming I helped you out in a questions and answers topic won't you return the favour by helping me with one my coding problems, or recommend some one who can chat to me over pms about helping and how to overcome my obstacles, after all lets just say I did help you or them or many people with similar problems, in that topic.

Here i have a topic for those of you struggling with type writer text and mugshots in your games especially if it is a rpg see the link below for more info

http://gmc.yoyogames...howtopic=619103

almost no code needed, only uses two events.

click here for the l8est version of feed the alien pizza, it has some major polished up features.


#2 chance

chance

    GMC Member

  • Global Moderators
  • 8762 posts
  • Version:GM:Studio

Posted 20 April 2014 - 11:43 AM

It's nice to provide examples or tutorials.  But these belong in the Tutorials Forum.

 

Just follow the rules and guidelines, and submit them in that forum.


  • 0