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: Process time of all instances of a certain object  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

Antidote

>.>
Process time of all instances of a certain objec...
« on: July 01, 2007, 02:40:48 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
Lets say I want to get the amount of time it takes for a rupee or an octorock to go through it's process. and then total that with all like instances. How would I go about doing this? Some help is greatly appreciated.

EDIT:
I've been tinkering with this for a few days but I haven't turned up anything. I originally got the idea from an rProfiler screen from raist on the GMC.
« Last Edit: July 01, 2007, 02:42:37 am by Antidote »
Logged
  • Axiomatic Data Laboratories
Re: Process time of all instances of a certain o...
« Reply #1 on: July 01, 2007, 03:37:42 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
I don't know exactly if this is what you're wanting, but:

global.maximum_time=0;
with (rupee)
{
 global.maximum_time=max(global.maximum_time,alarm[0]);//supposing that alarm[0] represents the amount of time this instance has until it disappears.
}
with (heart)
{
 global.maximum_time=max(global.maximum_time,alarm[0]);
}
//continue this with other items
Logged

Antidote

>.>
Re: Process time of all instances of a certain o...
« Reply #2 on: July 01, 2007, 04:27:47 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
actually what I meant was the process times (As in, how long it takes the object to run through all of its commands)

EDIT:
This is what i'm talking about:


The arrow that says "Time Used by all Instances" I get what it's saying about the begin step and end step but whats confusing me is the fact that I keep getting times that are nowhere near accurate. (I.E: I have 8 objects but it only takes 0.08 seconds) how would I go about accurately doing this?
« Last Edit: July 01, 2007, 04:35:54 am by Antidote »
Logged
  • Axiomatic Data Laboratories
Re: Process time of all instances of a certain o...
« Reply #3 on: July 01, 2007, 04:34:59 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
actually what I meant was the process times (As in, how long it takes the object to run through all of its commands)
Ah, I understand. I don't know if you can do this in GM or not, but I think there is a function that returns the time of your PC clock, then you just have to subtray the times in each step of an object... I don't know what's the function though. Try too see it in the tutorials.

EDIT: I don't think I understood those graphics ver well, but if you already have that variable for each instance's time, then you only have to do:

total = 0
with (all)
{
 total += self.time;
}
« Last Edit: July 01, 2007, 04:39:29 am by sjegtp »
Logged

Antidote

>.>
Re: Process time of all instances of a certain o...
« Reply #4 on: July 01, 2007, 04:38:31 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
Oh, so i get the current time in the begin step, then calculate the difference in the end step? I think I get it now. I'll see if I can do it that way.

Edit:
Hmm, I still can't figure this out, ah well I'll leave it be for now
« Last Edit: July 01, 2007, 05:08:11 am by Antidote »
Logged
  • Axiomatic Data Laboratories
Pages: [1]   Go Up

 


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



Page created in 0.505 seconds with 44 queries.