Jump to content

Ahh - Script:


Recommended Posts

Ok, Contrathetix :D I have figured it all out, Except I have 1 slight problem. They won't equip the outfits, and EquipItem it says is not a function. It will add the Outfit to their inventory, but they won't equip it. You now anyway around that ?

 

 

  Reveal hidden contents

 

 

Yeah I decided to use your formatting as it is a lot easier to work with :D lol

Edited by Karel2015
Link to comment
Share on other sites

I've also tried this with no avail:

 

 

  Reveal hidden contents

Link to comment
Share on other sites

Now that is tricky. EquipItem is a member of Actor script, and I have no idea how you can cast an ObjectReference as Actor. You can cast an Actor as ObjectReference, though, but I am not sure if it works the other way round. If you want to equip items, you need to somehow get an Actor out of the ObjectReference, and I have no idea how you can do that if simple casting fails. :P

 

Maybe the wiki has something useful, because I have never done it that way.

Link to comment
Share on other sites

The issue I noticed was that you are using PlaceAtMe instead of PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod = 4, EncounterZone akZone = None). PlaceAtMe returns an Objectreference while PlaceActorAtMe returns an Actor. So if you simply change all your PlaceAtMe calls to PlaceActorAtMe calls, everything should work.

Link to comment
Share on other sites

That's what this is for:

ObjectReference rPlaced = None
rPlaced.AddItem(WeaponHeavy, 1)    
(rPlaced as Actor).EquipItem(WeaponHeavy)

\\Problem is the script is an ObjectReference Extension, So it won't let me use many of the Actor Functions\\

I actually figured out the problem, I'm a dope lmao. I was linking in the outfits / weapons as Leveled Items lists, which won't work properly with EquipItem, Converting them to individual Weapon / Armor references seems to solved the problem for now.

Edited by Karel2015
Link to comment
Share on other sites

  • Recently Browsing   0 members

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