Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

NPC OnConversation event issue.

NeverwinterWightsNeverwinterWights Member Posts: 204
edited July 2018 in Builders - Scripting
If I remember right the OnConversation event also acts as an OnClick event for npcs. Maybe not, it's been awhile since I've used it. I've been trying to get NPCs to speak a random one line greeting (not using an actual conversation) using this event. Seems like it should be simple enough but isn't working.

void main() { string sTag = GetTag(OBJECT_SELF); //if (sTag == "BEGGAR_MALE" || sTag == "BEGGAR_FEMALE") //{ string sGreet; switch (Random(5)) { case 0: sGreet = "I haven't eaten in days."; break; case 1: sGreet = "Please. Can you spare a gold piece?"; break; case 2: sGreet = "Please show pity on me."; break; case 3: sGreet = "I'm down on my luck. I just need a little coin."; break; case 4: sGreet = "Help out a wounded adventurer?"; break; } //ActionSpeakString(sGreet); FloatingTextStringOnCreature(sGreet, OBJECT_SELF); //} PlayVoiceChat(VOICE_CHAT_HELLO, OBJECT_SELF); //ExecuteScript("nw_c2_default4", OBJECT_SELF); }


Sign In or Register to comment.