Explanation of the native keyword

Post » Sun Jun 17, 2012 9:22 pm

I am currently perusing through different scripts in the Creation Kit and am coming across the native keyword in the function declaration, with no code in the function itself.

An example would be:
Actor.psc - Function ShowBarterMenu() native

Is the code for this in another spot? where is this spot? am I able to change/view that code? or am I misunderstanding?
User avatar
Mimi BC
 
Posts: 3282
Joined: Sat Oct 07, 2006 10:30 pm

Post » Sun Jun 17, 2012 7:51 pm

Apparently this means it is part of the source code?

Would that be something that is required by a skyrim script extender then, or is there no way to change how a native function works?
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Sun Jun 17, 2012 11:14 pm

From the Creation Kit wiki:

The "Native" flag indicates a function that does not have a function body, because the function is implemented by the game itself. If you add the native flag to a function the game does not expose, the compiler won't complain, but the game will error at you.

So yes, it would seem native functions are those that are hard coded.
User avatar
Sunny Under
 
Posts: 3368
Joined: Wed Apr 11, 2007 5:31 pm


Return to V - Skyrim