Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


- - - - -

Passing userdata to global function called from Angelscript code


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 Shelim   Members   -  Reputation: 146

Like
0Likes
Like

Posted 14 August 2013 - 02:42 AM

I have a script that does map generation for 2D game. It's called several times, once for each map it has to generate.

 

I passed a pointer to a map being generated as userdata into script context, but I don't know how to access it in a global function called from script. Am I missing something in docs?


Do not follow where the path may lead — go instead where there is no path and leave a trail.

Danger? Hah! I walk on the wild side! I laugh in the face of danger! Ha! Ha! Ha!


Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9673

Like
2Likes
Like

Posted 14 August 2013 - 08:42 AM

You can get a pointer to the current context via the asGetActiveContext() function. 



#3 Shelim   Members   -  Reputation: 146

Like
0Likes
Like

Posted 14 August 2013 - 09:03 AM

You can get a pointer to the current context via the asGetActiveContext() function. 

Thanks, that's exactly what I needed :-)


Do not follow where the path may lead — go instead where there is no path and leave a trail.

Danger? Hah! I walk on the wild side! I laugh in the face of danger! Ha! Ha! Ha!





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