Changing NPC event scripts on the fly...
-
- World Leader - LoT: Thay
- Posts: 71
- Joined: Fri Jun 04, 2004 3:27 pm
- Location: Thaymount, Thay
- Contact:
Changing NPC event scripts on the fly...
I heard somewhere it was possible, i'm asking because i have a system in which i spawn some Standard palette npc and i want to use henchmen AI, rather than putting this NPC in the custom palette and changing the scripts, i rather do it "on the fly" by adding variables on the npc to define ondeath, onspawn etc event types.
[color=red]"How wonderfully mad of you!"[/color]
Jeff from Ea has a spawn system that can do a lot of what you are wanting.
You may want to talk with him about how he sets the variables on his spawns on the fly using the DM Client a bit for some ideas.
I cant give details as I agreed to no divulge anything of his code for intellectual property reasons however and I will not violate his rights in that regard.
You may want to talk with him about how he sets the variables on his spawns on the fly using the DM Client a bit for some ideas.
I cant give details as I agreed to no divulge anything of his code for intellectual property reasons however and I will not violate his rights in that regard.
-
- Groundling
- Posts: 137
- Joined: Tue Nov 25, 2003 7:29 am
- Location: Avlis Team - Tairis'nadur Team
The most sufficient way I can think of is to use the SignalEvent command
Example:
Example:
In other words, you can have one script (In the User Defined event) with many different numbered events, that can be activated by any external source, but under normal conditions they are slumbering...object oNPC;
event eSpecialEvent;
eSpecialEvent = EventUserDefined(1234);
SignalEvent(oNPC,eSpecialEvent);