Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

what does offset point to in GetProperty


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Isaac Paul   Members   -  Reputation: 182

Like
0Likes
Like

Posted 23 February 2013 - 12:35 PM

so for get property in the asScriptObject class:

 

GetProperty(asUINT index, const char **name, int *typeId = 0, bool *isPrivate = 0, int *offset = 0, bool *isReference = 0, asDWORD *accessMask = 0);

 

It assigns an offset which I assume is pointing to the data for that property, but i can't exactly tell what it is pointing to. Is it the actual raw data or some sort of angelscript wrapper?

 

What I'm trying to accomplish is assigning to a angelscript class's members. I need to be able to assign values (ints, ect) and references to other script objects.

 

Any help would be greatly appreciated smile.png


Edited by izackp, 23 February 2013 - 12:36 PM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3375

Like
0Likes
Like

Posted 23 February 2013 - 12:54 PM

The offset points to the location within the object where the property is. If isReference is true, the property is stored as a pointer to the actual property. In this case you'll need to deference the pointer after adding the offset.

 

It may be easier to use asIScriptObject::GetAddressOfProperty() instead of asIObjectType::GetProperty.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 Isaac Paul   Members   -  Reputation: 182

Like
0Likes
Like

Posted 24 February 2013 - 06:53 AM

Awesome I didn't even see that function. Thanks.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS