Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   obj.objecttype (https://forums.graalonline.com/forums/showthread.php?t=76530)

Chompy 08-27-2007 09:53 PM

obj.objecttype
 
Well.. the thread name is kinda silly.. but.. does objecttype return the parent objecttype (here being TStaticVar)?
PHP Code:

function onCreated() {
  
temp.obj = new TStaticVar("TestObject");
  
temp.obj.foo "bar";
  
  
temp.obj2 = new TestObject();
  
  echo(
temp.obj2.objecttype());


Is there a way to make it echo/return "TestObject"?

Can't seem to find a way...

zokemon 08-27-2007 10:01 PM

Don't think there is a way, nope.

Inverness 08-27-2007 10:02 PM

TestObject isn't an actual object type, just the name of the object the second TStaticVar was copied from.

Chompy 08-27-2007 10:30 PM

Quote:

Originally Posted by Inverness (Post 1343849)
TestObject isn't an actual object type, just the name of the object the second TStaticVar was copied from.

But whatever I named the TStaticVar, I wouldn't get the object name of the second TStaticVar or the 'sub-object' :(

Inverness 08-28-2007 12:22 PM

Quote:

Originally Posted by Chompy (Post 1343874)
But whatever I named the TStaticVar, I wouldn't get the object name of the second TStaticVar or the 'sub-object' :(

Ugh, the concept is amazingly simple you know, and I'm rather irritated at your lack of understanding about something I thought you would have known.

new Object(Name);

The object can be an existing one, in which case all editable variables will be copied including its joined classes, and the copied object will be of the same type as the original. Or if its the name of an object type, a new instance of that type will be created.

If you've ever made new GuiProfiles it would be simple to understand.

PHP Code:

function onCreated() {
  
obj = new TStaticVar("TestObject");
  
obj.foo "bar";
  
  
obj2 = new TestObject();


PHP Code:

function onCreated() {
  
obj = new TStaticVar("TestObject");
  
obj.foo "bar";
  
  
obj2 = new TStaticVar();
  
obj2.copyfrom(obj);


Both are doing the exact same thing.

Chompy 08-30-2007 01:58 PM

Quote:

Originally Posted by Inverness (Post 1344129)
Ugh, the concept is amazingly simple you know, and I'm rather irritated at your lack of understanding about something I thought you would have known.

uhm? That was just an example, because I mostly use your maketype() function :o

Em 08-31-2007 12:06 AM

Woah, Inverness I was reading this thread just out of curiosity.. And then I saw your post. I'm kind of shocked. Why are you so mean and arrogant O.o

Saying things like "amazingly simple you know".. As if he is an idiot for not understanding ?
And you're irritated by his ignorance.. ? Why should you find that irritable ? It's not affecting you in any way O.o

I've always thought you were a reasonable person... I mean common he was asking a question, not going around yelling at people. You should save you scorn for when it's appropriate.

Inverness 08-31-2007 12:09 AM

Quote:

Originally Posted by Em (Post 1344807)
Woah, Inverness I was reading this thread just out of curiosity.. And then I saw your post. I'm kind of shocked. Why are you so mean and arrogant O.o

Saying things like "amazingly simple you know".. As if he is an idiot for not understanding ?
And you're irritated by his ignorance.. ? Why should you find that irritable ? It's not affecting you in any way O.o

I've always thought you were a reasonable person... I mean common he was asking a question, not going around yelling at people. You should save you scorn for when it's appropriate.

Hey, I have expectations of certain scripters. And my opinion of Chompster's scripting capability is high enough that I thought he would have known. :p
Quote:

Originally Posted by Chompy (Post 1344739)
uhm? That was just an example, because I mostly use your maketype() function :o

Thats just creating a TStaticVar with a certain name with classes joined to it. Then that can be copied with classes included so you don't have to join them again. It also looks cool at the same time.

Kyranki 08-31-2007 12:58 AM

Quote:

Originally Posted by Em (Post 1344807)
Woah, Inverness I was reading this thread just out of curiosity.. And then I saw your post. I'm kind of shocked. Why are you so mean and arrogant O.o

Saying things like "amazingly simple you know".. As if he is an idiot for not understanding ?
And you're irritated by his ignorance.. ? Why should you find that irritable ? It's not affecting you in any way O.o

I've always thought you were a reasonable person... I mean common he was asking a question, not going around yelling at people. You should save you scorn for when it's appropriate.

Well, there's a couple scripters around the scripting forums who when coming around learned alot from Inverness, those including (and probably the only) are Chompy and myself. :O

coreys 08-31-2007 01:37 AM

Quote:

Originally Posted by Em (Post 1344807)
Woah, Inverness I was reading this thread just out of curiosity.. And then I saw your post. I'm kind of shocked. Why are you so mean and arrogant O.o

Saying things like "amazingly simple you know".. As if he is an idiot for not understanding ?
And you're irritated by his ignorance.. ? Why should you find that irritable ? It's not affecting you in any way O.o

I've always thought you were a reasonable person... I mean common he was asking a question, not going around yelling at people. You should save you scorn for when it's appropriate.

Quote:

Originally Posted by Inverness (Post 1344809)
Hey, I have expectations of certain scripters. And my opinion of Chompster's scripting capability is high enough that I thought he would have known. :p

Basically he's saying it's more of a compliment.

Chompy 08-31-2007 12:23 PM

<3 Inver
<3 Stan

Hehe.. and Inver, that maketype function indeed saves time and looks cool :p


All times are GMT +2. The time now is 08:01 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.