Jump to content

Binding a Projectile in Papyrus to SKSE


Recommended Posts

Hi, this is an SKSE & Papyrus related question. Is it possible to map a Papyrus Projectile to a CommonLib Projectile (in RE/P/Projectile.h)? I keep getting the following error in Papyrus logs which tells me that types are not compatible. I've only used primitive types and haven't had this issue before. I'm working off the example here (it's a combined starter project and tutorial). Relatedly, is there a discord that can be used to ask questions like this? Thx.

error: Native static function TestProjectileFunction does not match existing signature on linked type TestPlugin. Function will not be bound.
Link to comment
Share on other sites

3 minutes ago, dylbill said:

I'm not sure exactly what you're trying to do, can you elaborate? A good place to ask SKSE related stuff is MrowrPurr's discord: https://discord.com/channels/874895328938172446/945560222670393406 

Also sometimes searching on Github can help

I'm hoping to use the Projectile class (or ArrowProjectile) in SKSE using data passed in from Papyrus. I'm particularly interested in retrieving the gravity data of a projectile but that shouldn't really affect things.

SKSE function could be:

float GetProjectileData(RE::Projectile* a_projectile)


Papyrus function:

float Function GetProjectileData(Projectile akProjectile) global native

So I'm trying to pass in a Projectile from Papyrus and access some of its attributes that are inaccessible from Papyrus, such as its gravity data. I will check out the discord as well thx.

Link to comment
Share on other sites

In c++ you'll want to use something like this: 

float GetProjectileData(RE::StaticFunctionTag*, RE::BGSProjectile* projectile) {

}

For binding the function to papyrus check out this video: 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...