Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Request / Linking] draw_text_sprite???  (Read 2536 times)

0 Members and 1 Guest are viewing this topic.
[Request / Linking] draw_text_sprite???
« on: June 02, 2006, 01:28:02 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
Whats the GM 6 (version, I guess????) of draw_text_sprite????
« Last Edit: March 06, 2012, 09:48:53 am by Niek »
Logged
Re: draw_text_sprite???
« Reply #1 on: June 02, 2006, 01:32:21 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
Its not needed because Gm 6.1 has:
font_add_sprite
Logged
Re: draw_text_sprite???
« Reply #2 on: June 02, 2006, 01:46:22 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
so say I want this:

{font_add_sprite(view_xview+200,view_yview+30,string(global.arrow_count),-1,10,sprsmall_numbers,"0",1);}

how is it supposed to be written?
Logged

Goodnight

Once and future Captain
Re: draw_text_sprite???
« Reply #3 on: June 02, 2006, 02:25:03 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
First you have to do font_add_sprite() once to turn you sprite into a font, then just do draw_text() as normal.

Or use this script I made. ;)
Logged
Re: draw_text_sprite???
« Reply #4 on: June 02, 2006, 03:08:57 am »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Create event:
Code: [Select]
font_small_numbers = font_add_sprite(sprsmall_numbers, ord('0'), 0, 1);
draw_set_font(font_small_numbers);

Draw event:
Code: [Select]
draw_text(view_xview[0] + 200, view_yview[0] + 30, string(global.arrow_count));
EDIT: If it's just the numbers from 0-9 then you just use ord('0'), if it's the whole alphabet then make sure you tell it the first character... like ord('A') etc.
« Last Edit: June 02, 2006, 03:11:34 am by TheRealMethuselah »
Logged
Re: draw_text_sprite???
« Reply #5 on: June 02, 2006, 03:37:00 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
I dont have a registered version. :-\
Logged

Goodnight

Once and future Captain
Re: draw_text_sprite???
« Reply #6 on: June 02, 2006, 03:42:21 pm »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
I didn't think you needed to be registered. For my replacement script, you don't.
Logged
Re: draw_text_sprite???
« Reply #7 on: June 02, 2006, 03:51:04 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
For some reason I cant get it to work.

EDIT: heres what I put in the draw event:
draw_text_sprite(200,30,string(global.arrow_count),-1,10,sprsmall_numbers,ord("0"),1)
« Last Edit: June 02, 2006, 03:54:10 pm by zoso_111 »
Logged

Goodnight

Once and future Captain
Re: draw_text_sprite???
« Reply #8 on: June 02, 2006, 04:36:28 pm »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
And what is the error, it says you have to be registered? If that's it, the link I gave describes how to fix that.

Basically there is a registered-only function in the script, draw_sprite_ext(), because I didn't know the script would refuse to load for anyone who is unregistered. But you can take out that line and the script will still work as long as the scale is always 1.
Logged
Re: draw_text_sprite???
« Reply #9 on: June 02, 2006, 05:43:13 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
O I was tlking about the " font add sprite", I already took out " draw sprite ext", but whats wrong with my code?

EDIT: the error is when I equip the item, it says trying to draw unexisting sprite.
« Last Edit: June 02, 2006, 06:06:50 pm by zoso_111 »
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.043 seconds with 54 queries.