Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

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 by Elias555
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

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 by Elias555
Link to comment
Share on other sites

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

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

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 by Elias555
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...