Jump to content


Photo

Make room run for certain amount of time


  • Please log in to reply
14 replies to this topic

#1 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 07:29 AM

I was using score per room for my game Driver, but that is too hard for many levels. How do I make my rooms change after a certain time? I'm pretty sure you use steps to-do this, but I'm not sure of the command. Also how would I set the Steps:Seconds ratio to 1:1. Is this smart to-do?
Thanks.

EDIT: Oops, almost forgot, I know you can do this with D&D so please no code unless absolutely necessary.

Edited by bomberswarm2, 21 June 2012 - 07:30 AM.

  • 0

#2 Blake

Blake

    GMC Member

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

Posted 21 June 2012 - 07:36 AM

A steps to seconds ratio of 1 to 1 is not something you want to do. That would mean your game would be running at 1 fps, which is unplayable. Whenever you want to achieve something to do with time, use alarms. There is a D&D action for these. Read up on them in the manual.
  • 0

#3 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 21 June 2012 - 07:37 AM

I was using score per room for my game Driver, but that is too hard for many levels. How do I make my rooms change after a certain time? I'm pretty sure you use steps to-do this, but I'm not sure of the command

Set an alarm in the create event. In the alarm move to the next room.

Also how would I set the Steps:Seconds ratio to 1:1. Is this smart to-do?

Lol no. That would make your game "lag" at 1fps.To set the number of steps per second, in the room properties change the room speed parameter.

Edit: Ninjas. Ninjas everywhere.

Edited by ramses12, 21 June 2012 - 07:38 AM.

  • 0

#4 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 07:41 AM

Okay then, how do I find out my current Steps:Seconds ratio?
  • 0

#5 Blake

Blake

    GMC Member

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

Posted 21 June 2012 - 07:43 AM

The room speed is how many steps are in one second. The default is 30. You can change it in the settings tab of your room.
  • 0

#6 GMKn00b

GMKn00b

    GMC Member

  • GMC Member
  • 150 posts
  • Version:Unknown

Posted 21 June 2012 - 07:53 AM

Make a controller object.

Have an alarm event, and put action "go to next room"

(60 steps are 1 second..... so "how many seconds" x 60)
Sorry, the quote above is incorrect, here is the explanation:
Spoiler


So example: (to make your room run for 3 seconds)
Using DnD.....

//in create event

Have set alarm action :GM125:
number of steps: 180
in alarm no: Alarm 0


//in event "Alarm 0"

Have a next room event :GM035:
or have "Different room" action (to specify a level) :GM037:

Hope that helped :thumbsup:

Edited by GMKn00b, 21 June 2012 - 10:25 AM.

  • 1

#7 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 09:46 AM

Make a controller object.

Have an alarm event, and put action "go to next room"

(60 steps are 1 second..... so "how many seconds" x 60)

So example: (to make your room run for 3 seconds)
Using DnD.....

//in create event

Have set alarm action :GM125:
number of steps: 180
in alarm no: Alarm 0


//in event "Alarm 0"

Have a next room event :GM035:
or have "Different room" action (to specify a level) :GM037:

Hope that helped :thumbsup:


Yea but there's a problem! My scoring also uses steps, it is ment to go up 10 points per 30 steps, but it goes up way faster. It is set on alarm 0 too. Please what else can I do? (P.S. The scoring is also on the create event)
  • 0

#8 GMKn00b

GMKn00b

    GMC Member

  • GMC Member
  • 150 posts
  • Version:Unknown

Posted 21 June 2012 - 09:51 AM

Ah! Easy!

Make another alarm, "Alarm 1"

So in your create event

Change the settings of the "set alarm" action :GM125:
Just change the "in alarm no:" part to Alarm 1

So make another event "Alarm 1"
And then transfer the actions from "Alarm 0"
(only the action to go to next room, leave the ones for the scoring)

That should fix it :biggrin:

EDIT:
So in Alarm 0, it should be settings for your scoring
So something like:
Spoiler

And in Alarm 1, settings for change room :thumbsup:
So something like:
Spoiler


Haha, hope that fixes everything now :sweat:

Edited by GMKn00b, 21 June 2012 - 10:28 AM.

  • 0

#9 Blake

Blake

    GMC Member

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

Posted 21 June 2012 - 09:53 AM

(60 steps are 1 second..... so "how many seconds" x 60)

This is not true. As I said above, the number of steps in one second is the room speed. By default, there is 30 steps in one second because the default room speed is 30.

To increase the score by 10 every 30 steps, you can use this:

score += 10*(room_speed/30);

  • 0

#10 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 11:02 AM

Ah! Easy!

Make another alarm, "Alarm 1"

So in your create event

Change the settings of the "set alarm" action :GM125:
Just change the "in alarm no:" part to Alarm 1

So make another event "Alarm 1"
And then transfer the actions from "Alarm 0"
(only the action to go to next room, leave the ones for the scoring)

That should fix it :biggrin:

EDIT:
So in Alarm 0, it should be settings for your scoring
So something like:

Spoiler

And in Alarm 1, settings for change room :thumbsup:
So something like:
Spoiler


Haha, hope that fixes everything now :sweat:

It dosen't. The scoring ala... actully, on second thoughts screw this, I'll just film what's going on.
  • 0

#11 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 11:10 AM


As you can see, there's a problem.
EDIT: Okay, seeing as my video dosen't want to be embedded, here it is: LINK TO VID

Edited by bomberswarm2, 21 June 2012 - 11:12 AM.

  • 0

#12 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 11:18 AM

*Cough* BUMP! *cough* Please people help me the game is due in 40 mins
  • 0

#13 Blake

Blake

    GMC Member

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

Posted 21 June 2012 - 11:37 AM

I would, but you're completely ignoring my posts...
  • 0

#14 bomberswarm2

bomberswarm2

    GMC Member

  • New Member
  • 18 posts
  • Version:GM8

Posted 21 June 2012 - 10:08 PM

I would, but you're completely ignoring my posts...

Okay, where do I put your code?
  • 0

#15 GMKn00b

GMKn00b

    GMC Member

  • GMC Member
  • 150 posts
  • Version:Unknown

Posted 22 June 2012 - 06:46 AM

-Firstly, delete the "next room" action in create (this should be on the Alarm)
-You have no "Alarm events" (click on add events) and select "Alarm" --> :GM125:

1.)Actions for CREATE event
Have two "set alarms" (it is in main2 tab) --> :GM040:
Setting for "set alarms"
Spoiler


2.)Make a NEW EVENT (click add event)
2 Alarms (Alarm 0 and 1) --> :GM125:
Here are the actions:
Spoiler


So you should have these events:
Spoiler


:GM123: = Delete all the action in create and just have the ones I said and keep move fixed :GM002:
:GM125: = Put the actions in the spoiler above
:GM130: = Don't change anything

Sorry for late reply (I went to sleep) :sweat:

Edited by GMKn00b, 22 June 2012 - 07:17 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users