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 / Solved] Problem  (Read 1616 times)

0 Members and 1 Guest are viewing this topic.
[Request / Solved] Problem
« on: June 02, 2006, 07:44:33 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 252
Why doesn't this work in the wack ass Game Maker?  >:(

Code: [Select]
draw_set_color(16777215);
draw_roundrect(view_xview[0] + 16, view_yview[0] + 16, view_xview[0] + view_wview[0] - 16, view_yview[0] + 16 + 64, 0);

I place it in the Create Event with no background color and yet it does not draw but only in the Draw Event.
« Last Edit: March 06, 2012, 03:36:51 pm by Niek »
Logged
The Legend of Zelda: The Spell Caster
Release Date: ?

I'm a faithful man! Don't be a whimp, fight for life.
Re: Problem
« Reply #1 on: June 02, 2006, 08:04:39 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Probably because GM only calls the Draw event when it captures a API paint event, and the other events are done at other times, meaning that if you draw ouside the Draw event its probably drawing to some unknown place.
Logged

mit

Re: Problem
« Reply #2 on: June 03, 2006, 08:09:38 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
GM redraws the screen each step, and each step it calls the draw event at the right time for you to draw what you want and it be seen. So it does draw it, however only for such a small time you can't see it. Although you'd think it would stay with no background colour, well, it doesn't, as the window is still refreshing each step.

You can disable the redrawing of the screen automatically by using set_automatic_draw(0), and then use screen_refresh() after each draw command.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: Problem
« Reply #3 on: June 08, 2006, 07:18:15 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 252
How much can the function set automatic draw can handle, please explain that function and set synchronization.
Logged
The Legend of Zelda: The Spell Caster
Release Date: ?

I'm a faithful man! Don't be a whimp, fight for life.
Re: Problem
« Reply #4 on: June 08, 2006, 07:23:15 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1635
What do you mean by "how much"? set_automatic_draw stops it from automatically calling the draw event every step. set_synchronization synchronizes the drawing with the refresh rate of the monitor.

Lol, I was just playing with set_automatic_draw, redrawing the screen onces every 5 steps, it looked like a strobe light. I even made the room black with a flashing white light, it looks aewsome.
« Last Edit: June 08, 2006, 07:26:51 pm by Scooternew »
Logged
Re: Problem
« Reply #5 on: June 08, 2006, 07:58:43 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 252
Off Topic: Un-block me.
Logged
The Legend of Zelda: The Spell Caster
Release Date: ?

I'm a faithful man! Don't be a whimp, fight for life.
Re: Problem
« Reply #6 on: June 08, 2006, 08:49:41 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1635
Off-topic - no.
Logged
Pages: [1]   Go Up

 


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



Page created in 0.293 seconds with 51 queries.

anything