Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 06/09/08 01:06

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Detecting the OS Oni is running in!

var int version=0;


func testvers(void)
{
        dmsg "PC demo or Mac"
        version = 1
        if(li_center_cursor)
{ 
    dmsg " "
    dmsg " "
    dmsg " "
    dmsg " "
    dmsg PC
    version = 2
}
}

There. Pretty self explanitory. Though somebody has probaly done this before me, here it is. I am sure you guys can think of a creative way to use it (maybe combining the Mac and PC OTA versions into one script, so you don't have to go hunting for versions?)

Also, could someone with a Mac check this (just in case)?

Last edited by Gumby (06/09/08 16:06)


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#2 06/09/08 12:06

s10k
Member
Registered: 01/14/07
Website

Re: Detecting the OS Oni is running in!

Pretty interesting. Thanks a lot Gumby!

Also the variables like li_center_cursor and env_collision are called by engine, right?

Thanks.

Offline

#3 06/09/08 14:06

Barneyhater
Member
From: New York City, NY, USA
Registered: 04/13/08
Website

Re: Detecting the OS Oni is running in!

Huh did I copy something wrong? I copied everything in exactly into a bsl file but it doesnt work. Am I supposed to add anything?


"It is not hatred but indifference that will destroy us." -Unknown
"One death is a tragedy. The death of a million is a statistic" -Joseph Stalin

Offline

#4 06/09/08 16:06

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Detecting the OS Oni is running in!

Make sure the fork is going in the right place.

Or, just temporarily move all of your bsl files in one of the levels away and replace it with the attached file.

@Script10000

Yes, those are set by the engine by default.

...Hmm. I may have made a mistake with the coding. I thought that my if statement thing worked. I guess not. >_>

I fixed it. And removed Mac beta 4. Really, who uses it?

...as long as Mac beta =/= Mac retail *cough*


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#5 06/09/08 17:06

Barneyhater
Member
From: New York City, NY, USA
Registered: 04/13/08
Website

Re: Detecting the OS Oni is running in!

tried it... all it says is PC or Mac


"It is not hatred but indifference that will destroy us." -Unknown
"One death is a tragedy. The death of a million is a statistic" -Joseph Stalin

Offline

#6 06/09/08 19:06

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Detecting the OS Oni is running in!

You are running a Mac or the PC demo then. Correct?


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#7 06/09/08 19:06

Barneyhater
Member
From: New York City, NY, USA
Registered: 04/13/08
Website

Re: Detecting the OS Oni is running in!

Gumby wrote:

You are running a Mac or the PC demo then. Correct?

Im running a mac... Not a demo though... Huh???


"It is not hatred but indifference that will destroy us." -Unknown
"One death is a tragedy. The death of a million is a statistic" -Joseph Stalin

Offline

#8 06/10/08 09:06

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Detecting the OS Oni is running in!

I mean Mac (retail) OR PC (demo). They have the same engine limitations. PC (retail) has a bit more scripting features.

Last edited by Gumby (06/10/08 09:06)


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#9 06/10/08 15:06

Barneyhater
Member
From: New York City, NY, USA
Registered: 04/13/08
Website

Re: Detecting the OS Oni is running in!

Gumby wrote:

I mean Mac (retail) OR PC (demo). They have the same engine limitations. PC (retail) has a bit more scripting features.

Yeah I have a Mac (retail).


"It is not hatred but indifference that will destroy us." -Unknown
"One death is a tragedy. The death of a million is a statistic" -Joseph Stalin

Offline

#10 06/10/08 19:06

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Detecting the OS Oni is running in!

Ok. Then the script worked.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

Board footer

Powered by FluxBB