Forum Jump :

Author Message

Posts: 4

Level: Member

Country: uk
In-game name:

#183561 Posted at 2015-10-28 09:10        
As is the norm with people who are new to the more advanced side of editing "I have an issue and have looked everywhere to solve it, blah, blah, blah...".

(I apologise if any of my terminology is incorrect but I hope you understand what I mean).

I am trying to create a small 4-player COOP mission for my first attempt at making a high-quality mission. Everything is running smoothly so far. My current problem is that I want to have conversations between the players and the friendly AI Command unit (named "Archway").

I am looking at BIKB way of doing chat because it seems simpler in the long term however it requires a named unit to be referenced in the script which is as simple as naming the unit. My problem is that there are 4 playable slots, not all may be occupied, I don't want AI group members, and if the current group leader (named "Kobold") is killed or is an unfilled player slot at launch how can the new group leader inherit the unit name to allow AI radio messages to the group?

I am extremely new to this but I have been doing my homework. Possible ideas I've had to solve it include:

Placing an AI group member, naming it "Kobold", set the probability of presence to 0 OR set condition of presence to False. (I don't know if scripting will reference non-existent units or whether only the non-existent unit will receive radio messages)

Placing a game logic named "Kobold", grouping all playable group members to the game logic unit. (I don't know if game logic counts a a placeable unit in the traditional sense)

Creating a script to somehow rename the current group leader and, if killed or not present at mission launch, rename the newly elected team leader as "Kobold". (Only have a basic knowledge of scripting and I am unsure what commands will allow me to do this. setUnitName? How will the script know what group I want to rename the leader of without setGroupId?

Setting a GroupId as "Kobold" but am unsure how to reference it in place of a unit name in the script. (setGroupId wants to reference a named unit withing the group [ *playableUnit* setGroupId "Kobold" ] but I can't guarantee that the unit I have given the INIT to will even be present at mission launch)

Some other external script... (But I still need to reference in-game named units for that to work)

I don't know if I'm barking up the wrong tree or how to even implement my ideas if I am correct. I just need a way of getting radio messages to all of the playable group with any player slot possibly not being occupied.

Thank you for any help or links to similar forum threads.

Tags: Group, Scripting, Talk