Are there any events fired as a result of crafting? I know that crafting GUI itself is started as the result of skill events, I'm just curious if an event happens when an item is created?
Crafting events...
Débuté par
FramnkRulez
, juil. 14 2010 07:14
#1
Posté 14 juillet 2010 - 07:14
#2
Posté 14 juillet 2010 - 09:14
EVENT_TYPE_CRAFT_ITEM is fired (to the module script, I think?) when an item is crafted.
#3
Posté 15 juillet 2010 - 03:23
Is there any information that can be gleaned from this event other than the person who did the crafting? There do not seem to be any strings, ints, floats, resources or objects other than the character passed with this event. Is there a way to figure out what item was crafted during this event?
#4
Posté 15 juillet 2010 - 08:31
The brute force way is to check the items before and after the event is fired. Before would be to check when the game-mode changes to the crafting GUI and after would be in the craft_item event (don't even know if this will work but wouldn't hurt to try)
#5
Posté 15 juillet 2010 - 12:49
You can try setting the ITEM_SEND_ACQUIRED_EVENT variable in the items editor to 1 for your item. This makes it send EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED to the module script when you gain the item. I'm not sure if this works for items gained through crafting, but I don't see why not. Presumably the item acquired is the 0th event object.
Modifié par FergusM, 15 juillet 2010 - 12:51 .
#6
Posté 15 juillet 2010 - 11:11
Good suggestions, thanks!





Retour en haut






