Jump to content
Undeadenemy

Trying to Set Name Sounds for Custom Units

Recommended Posts

Hello, I am building a custom unit that is supposed to be a ghost. I want units who spot this unit to call out "Ghost 200m front" similar to how the Ravage mod calls the zombies "Walker". Both "Ghost" and "Walker" are NameSounds that already exist in the game, but the setNameSound command doesn't work for my use case. (Enemy units of this type use nameSound "Rifleman" or "Man". I would prefer they are always identified as "Ghost" or "Unknown", and never "Man" or "Civilian".)

 

How do I get at the code to do this? What variables do I need to change, what functions do I call, and can I do this with the init field or will I need to create an addon faction, etc?

Share this post


Link to post
Share on other sites

nameSound = "XXX"; with XXX defined as word in the various radioProtocols 

Share this post


Link to post
Share on other sites

Thank you for your reply, however, that does not work. If I wanted to name a squad member "Ghost", I would use:

 

this setNameSound = "Ghost";

My character would then say "Ghost, move 75m, front." etc. However, placing that code in an enemy doesn't make my character call that enemy "Ghost". Though presumably the enemy squad leader would call that soldier "Ghost". I tested this with VR entities, and when my character spots the enemy VR entity, he calls it either "Rifleman" or "Soldier". I'm fairly sure I need to go deeper into the code to get this effect, maybe even down to the base class. It's just that there are hundreds of variables in the various Parent and Child classes to comb through, and I know what I'm trying to accomplish has been done before (Ravage does it, although it does occasionally mess up and call the zombies "Civilian" or "Rifleman", especially if the fog is thick or visibility is otherwise limited.

 

I'm assuming it works something like this:

1) The base class defines the broadest name sound, i.e. "Man".

2) A child class defines a more specific one i.e. "Civilian", "Soldier", etc.

3) A further child of that class then defines the type of "Soldier" - "Machine Gunner", "Rifleman", "AT Soldier", etc.

 

What I think I might need to do is create a new entity class based on one of the others, and then make sure that each instance where a nameSound is called for is either "Unknown", or "Ghost". That way, there is no possible way ARMA could derive "Rifleman", "Civilian", or anything else from it. I just need some guidance on where to start.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×