Elias555 Posted April 16, 2016 Share Posted April 16, 2016 (edited) Trying a different method but it won't compile.I don't understand, closest is defined as an actor, isn't it? It extends activemagiceffect and it's a spell. I included the error. Yes, it's filled. Event OnEffectStart(Actor akTarget, Actor akCaster) Actor Closest = Game.FindClosestActorFromRef(akCaster, 350.0) Closest.ShowGiftMenu(True,AllFood); type mismatch on parameter 2 (did you forget a cast?) EndEvent Is there a guide on how to convert variables? I'm sick of seeing this error. Edit: Another question. I need my spell to jump to a finished state OnDeath of the actor. Right now I can mimic it but it'll still be under active magic effects. I know I can hide it but it'll stuff things up under some circumstances. Edited April 16, 2016 by Elias555 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 16, 2016 Share Posted April 16, 2016 Post the entire script not just the event. It is complaining about AllFood. Is that a formlist? Is it defined?If it is not a formlist then that explains the error. Link to comment Share on other sites More sharing options...
Elias555 Posted April 16, 2016 Share Posted April 16, 2016 (edited) Post the entire script not just the event. It is complaining about AllFood. Is that a formlist? Is it defined?If it is not a formlist then that explains the error.It's essentially the entire script, minus the properties and header.Formlist? I thought it was for keywords(VendowItemFood). Damn! Is there a way to make it look for keywords instead? If I make a formlist it'll exclude mod added food. Thanks for all the help! Edit: I tried making a formlist with the keyword and then tried adding all food and neither worked. Edited April 16, 2016 by Elias555 Link to comment Share on other sites More sharing options...
lofgren Posted April 16, 2016 Share Posted April 16, 2016 Post the entire script including the properties. Since the compiler is complaining about a missing property, you should include them in your question. Link to comment Share on other sites More sharing options...
lofgren Posted April 16, 2016 Share Posted April 16, 2016 Also the closest actor from Ref will always be akCaster, since the closest actor to any actor is the actor himself. Link to comment Share on other sites More sharing options...
Elias555 Posted April 16, 2016 Share Posted April 16, 2016 I found out about that recently so I had to change everything.This is the new one, attached to a magic effect: Actor Property PlayerRef Auto FormList Property AllFood Auto Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.ShowGiftMenu(False, AllFood, True) ;Set to false so I can see their inventory EndEvent I've tested this on the people of riverwood from a COC character. Any other info needed? Link to comment Share on other sites More sharing options...
lofgren Posted April 16, 2016 Share Posted April 16, 2016 So it's working now? Sorry I thought you were still having problems getting ShowGiftMenu to work. Link to comment Share on other sites More sharing options...
Elias555 Posted April 16, 2016 Share Posted April 16, 2016 Yes, 2 problems, 1 new and I'll clarify the first. The first one being ShowGiftMenu isn't showing what I've selected in the formlist, whether it's just a keyword or all the food items.The second, ShowGiftMenu moves the items directly to the player inventory instead of the controlled actor(by the player) inventory. The controlled actor can be some distance away from the player actor so this exchange wouldn't make sense. I've been testing that without a formlist, of course. Link to comment Share on other sites More sharing options...
lofgren Posted April 16, 2016 Share Posted April 16, 2016 ShowGiftMenu will always transfer items to the player, so if you want the items to be transferred to somebody else you will have to move them from the player's inventory to the other actor. Link to comment Share on other sites More sharing options...
Elias555 Posted April 17, 2016 Share Posted April 17, 2016 (edited) ShowGiftMenu will always transfer items to the player, so if you want the items to be transferred to somebody else you will have to move them from the player's inventory to the other actor.I ended up using RemoveItem() which allows the item that was removed to go to the actors inventory. Edited April 19, 2016 by Elias555 Link to comment Share on other sites More sharing options...
Recommended Posts