How to add item to an actor?

Post » Tue Nov 20, 2012 3:06 pm

How do i add an item to an NPC? i searched the wiki under the Actor script and didnt see a method to do this :blush:

EDIT: nvm, i figured out that you need to cast the actor as a Object Reference
User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm

Post » Tue Nov 20, 2012 2:41 pm

EDIT: nvm, i figured out that you need to cast the actor as a Object Reference

The Actor script extends the ObjectReference script. That should mean you can do ObjectReference functions on an Actor (but not the other way round).

Actor Property actorRef  AutoMiscObject Property myItem  AutoEvent someEvent()   actorRef.AddItem(myItem)EndEvent

- Hypno
User avatar
Ernesto Salinas
 
Posts: 3399
Joined: Sat Nov 03, 2007 2:19 pm


Return to V - Skyrim