Petrification script
-
So I wanted to add statues of NPCs in areas I am making both for myself and for CoA, I was hoping if you could tell me the code you are using and how to apply it properly please?
For reference I mean to make npcs that look like the statue near Hardcastle's estate.
Also if you could tell me how to apply the stoneskin vfx to npcs even if they're not going to become statues, that would be a big help - thanks!
-
Thats actually pretty simple.
You need to edit the On SPawn routine of the NPC and prolly do something like this - please, check the Lexicon for proper function names:
void main() { ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), OBJECT_SELF); }
-
This kind of thing is kinda popular. so rather than every individual builder etc. creating a whole new OnSpawn event sript for their own statues, it's probably better to make a single resource and use that to save the number of different scripts and hard resource limits.
I would definitely recommend taking care to combine with OnConversation event script that ensures they always face the correct orientation and remove/modify OnAttacked, otherwise the statuses will animate in different circumstance.
Also, further, it may be even more prescient to have a standard "SpawnAs..." statue, "ghostly", etc. kind of script so builders can set a variable and a common scruipt will ensure the correct results...