Foggier Posted September 29, 2012 Share Posted September 29, 2012 Following problem. It's about a new playable race. The player takes a piece of clothing. This will be automatically exchanged for another item of clothing. For example, "OutfitLucasSimms" is exchanged for "NeelooOutfitLucasSimms". This works for the player. However, it should work simultaneously for the player and the NPC. Unfortunately, all previous attempts did not lead to success. Here are 2 scripts as an example. Equip OutfitLucasSimms: scn NeelooLucasSimms1SCRIPT BEGIN OnAdd player if player.GetIsRace Neeloo == 1 player.RemoveItem OutfitLucasSimms 1 player.AddItem NeelooOutfitLucasSimms 1 endif END Unequip NeelooLucasSimms: scn NeelooLucasSimms2SCRIPT BEGIN OnDrop player if Player.GetIsRace Neeloo == 1 player.RemoveItem NeelooOutfitLucasSimms 1 player.AddItem OutfitLucasSimms 1 player.Drop OutfitLucasSimms 1 endif END Link to comment Share on other sites More sharing options...
Deleted2547005User Posted September 29, 2012 Share Posted September 29, 2012 (edited) Begin OnAdd -> DO NOT use Player, if you do, the script only fires when the Player picks it up, not allowing it to fire when NPCs pick it up <tab>If Player.GetIsRace Neeloo == 1<tab><tab>AddItem NeelooOutfitLucasSimms 1 1 -> Adds the item silently.<tab><tab>RemoveMe -> Removes picked up item.<tab>EndIf End Begin OnDrop -> This script should only be added to Neeloo race clothing. There is also no need to check the player's race if the only way to acquire the Neeloo race clothing is via the clothing replace OnAdd scripts. <tab>Player.RemoveItem NeelooOutfitLucasSimms 1 1 -> Removes the item silently.<tab>Player.AddItem OutfitLucasSimms 1 1 -> Adds the item silently.<tab>Player.Drop OutfitLucasSimms 1 End Edited September 29, 2012 by Kuroitsune Link to comment Share on other sites More sharing options...
Foggier Posted September 30, 2012 Author Share Posted September 30, 2012 Thanks for the quick reply! In retrospect, it all makes sense. Link to comment Share on other sites More sharing options...
Recommended Posts