Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-27-2007, 09:53 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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...
__________________
Reply With Quote
  #2  
Old 08-27-2007, 10:01 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Don't think there is a way, nope.
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 08-27-2007, 10:02 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
TestObject isn't an actual object type, just the name of the object the second TStaticVar was copied from.
__________________
Reply With Quote
  #4  
Old 08-27-2007, 10:30 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Inverness View Post
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'
__________________

Last edited by Chompy; 08-27-2007 at 10:49 PM..
Reply With Quote
  #5  
Old 08-28-2007, 12:22 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Chompy View Post
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.
__________________
Reply With Quote
  #6  
Old 08-30-2007, 01:58 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Inverness View Post
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
__________________
Reply With Quote
  #7  
Old 08-31-2007, 12:06 AM
Em Em is offline
Registered User
Em's Avatar
Join Date: Oct 2006
Posts: 288
Em is an unknown quantity at this point
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.
__________________
Em is the proud owner of Skywide Design [Dot] ca
Reply With Quote
  #8  
Old 08-31-2007, 12:09 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Em View Post
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.
Quote:
Originally Posted by Chompy View Post
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.
__________________
Reply With Quote
  #9  
Old 08-31-2007, 12:58 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Quote:
Originally Posted by Em View Post
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
__________________
Stan.
Reply With Quote
  #10  
Old 08-31-2007, 01:37 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Em View Post
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 View Post
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.
Basically he's saying it's more of a compliment.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #11  
Old 08-31-2007, 12:23 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
<3 Inver
<3 Stan

Hehe.. and Inver, that maketype function indeed saves time and looks cool
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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