Jump to content


Photo

Setting Room Speed To 0?


  • Please log in to reply
7 replies to this topic

#1 Zeus2000

Zeus2000

    GMC Member

  • New Member
  • 45 posts

Posted 08 August 2008 - 01:09 AM

Currently I'm creating the pause screen for my game and I'm trying to set the room_speed to 0 for it,
but when I try it out, I get the error....

Trying to set the room speed to a value <= 0.

Can anyone help please?

Edited by Zeus2000, 08 August 2008 - 01:18 AM.

  • 0

#2 Mnementh

Mnementh

    15151

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

Posted 08 August 2008 - 01:12 AM

Don't. If you could do that, your game would freeze.

A better way would be to deactivate all instances except for a control instance.
  • 0

#3 Zeus2000

Zeus2000

    GMC Member

  • New Member
  • 45 posts

Posted 08 August 2008 - 01:18 AM

Don't. If you could do that, your game would freeze.

A better way would be to deactivate all instances except for a control instance.

Okay, I'll try that. Thanks.
  • 0

#4 GS-games

GS-games

    Creative

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

Posted 04 June 2011 - 07:27 PM

I have similar problems. I'm trying to make that the player at the start of the game get a message where he / she may write the "room_speed" for the game.

room_speed = get_string('How fast roomspeed do you want to use?','room speed');

My problem is that I get this error message: Error Message - Trying to set the room speed to a value <= 0.
  • 0

#5 xshortguy

xshortguy

    GMC Member

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

Posted 04 June 2011 - 07:28 PM

I find a good rule is that you should never change the room speed, since the drawing events are tied to it.
  • 0

#6 LOS.A

LOS.A

    GMC Member

  • GMC Member
  • 597 posts
  • Version:GM8

Posted 04 June 2011 - 07:31 PM

I have similar problems. I'm trying to make that the player at the start of the game get a message where he / she may write the "room_speed" for the game.

room_speed = get_string('How fast roomspeed do you want to use?','room speed');

My problem is that I get this error message: Error Message - Trying to set the room speed to a value <= 0.

Try using
room_speed = real(get_string('How fast roomspeed do you want to use?','room speed'));
because what you have there is a string, not a value.

Edit: I would not recommend the use of this, though, because it is way too easy to go wrong - people may write '-1' or 'I AM STUPID' instead of a number that is above 0. xshortguy has a point too, but this is not true for all games (ex. in those with no animation).

Edited by LOS.A, 05 June 2011 - 08:41 PM.

  • 0

#7 theg721

theg721

    G Dawg

  • GMC Member
  • 1959 posts
  • Version:GM8

Posted 05 June 2011 - 08:31 PM

get_integer()?
  • 0

#8 GS-games

GS-games

    Creative

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

Posted 14 June 2011 - 06:27 PM

Thanks! I have just started to use GML so I'm not so good at it yet..
but I will test your reply.

Edited by GS-games, 15 June 2011 - 10:00 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users