int i=cloneindex and then have textactor.[i]->text =dialogue
or some such, and i can't use strcpy it won't accept variable actor names. I've been trying different methods that seem logical but get innumerable errors, i've attempted to use things like using a function to call cloneID but it got too confusing on how to use it in the statements.
okay well I'll try to explain my goal and logical method:
I have a variable that stores a value directly relating to which line is called from an array of strings(chatlist), i want it also to be an array. Lets call it CHAT, and the reason for having it as an array is that each index of the array points to an NPC,
i.e. CHAT[2] is the relevant chat for NPC 2, so if CHAT[2]=15 then string 15 from the chatlist would be displayed above NPC2.
it is so that multiple instances can be going at once, i.e multiple NPCs chatting simultaneously.
also note that a single chatlist will be used by the entire CHAT array, so in most cases the same dialogue won't be called by other NPCs, except in special cases with generic reusable dialogue, I'll probably be separating chatlines by comment lines like NPC# and greetings etc.
okay this is incorrect I know, but this is to illustrate what I want happening to each clone seperately.
For text actor:
- Code: Select all
if (CHAT[cloneindex] >0) // checking if the NPC with the same value is engaged in chat
{
ChatID=getclone
char i= CHAT[cloneindex] //set the CHAT
ChatID->text= chatlist[i]
}
and of course I have a creator actor that creates a chat bubble parented to the NPC.
And the bubbles spawn the text, also The NPCs themselves will likely be separate actors so the anim list is separate and so I don't have to deal with the mess of actions per clone, also unless I create and pre parent each window to the npc invisible at startup, how will I reserve or assign clone index relative to the NPC number? :S
I'll upload a ged,
just a note though it hasn't got the CHAT array, just a single int called displaychat. I hadn't decided to use an array when I started prototyping it I'd have to change the scripts to reflect it being an array so I didn't change it.