I'm using messagelinked to pass dialog choices between scripts in the same prim and when I was passing one string it was fine, now I need to pass two different strings that replace different strings and I am having some problem understanding how to filter the responses
Menu script:
php
<snip>
send_anim(string anim)
{
llMessageLinked(LINK_THIS,1,(string)anim,NULL_KEY);
}
send_ammo(string ammo)
{
llMessageLinked(LINK_THIS,2,(string)ammo,NULL_KEY);
}
<snip>
(from one dialog page)
if(msg=="Huge"

{
llOwnerSay(name + " changed the pose to ' " + msg + " '."
;send_anim ("100m"
;state main_menu;
}
<snip>
(from another dialog page)
if(msg=="Waffles"

{
llOwnerSay("Yummy waffles....nom, nom, nom!"
;send_ammo ("Waffles"
;state main_menu;
}
else if(msg=="Toast"

{
llOwnerSay("Get you flaming toast here!"
;send_ammo ("Toast"
;state main_menu;
}
/php
Then in the receiving script. This is how I had it when I was just changing one string
php
link_message(integer sender_num,integer num, string str, key id)
{
gAnim=((string)str);
arm();
}
/php
The second message would contain
{
gBulletName=((string)str);
}
I'm not sure how to filter the sent messages so it will keep info and not reset the other each time you call up the dialog box. ( I set the pose in one click then when I go to change the ammo it resets the pose to the one I set in globals as default. This didn't happen when I had just one linked message, I could detach and reattach and it would keep the menu chosen pose)
I don't think an if statement works best since I need the options of both inputs since one controls the animation and one controls the ammo.
I hope I made that as clear as I could
any help is greatly appreciated.Thx
Lyndz~