Jump to content
Sign in to follow this  
Obscure CIA_Agent

Scripting in the init.sqs file

Recommended Posts

Hello again my friends.  I have another question for you.

I have an introduction in the beginning of my map where each player's name is shown at the bottom of the screen with some text infront of it. This part works fine, however when you disable AI the text still shows.

Here is the file so far:

~25

westsoldier1 action ["STROKEGUN"]

titletext [format ["The Lieutenant with Steyr AUG - %1", name westsoldier1], "plain down"]

~4

titletext [format ["The Sergeant, a Black Op with XMS/M4 Carbine - %1", name westsoldier2], "plain down"]  

~4

titletext [format ["The Corporal with XMS/M4 Carbine - %1", name westsoldier3], "plain down"]  

~4

titletext [format ["The Private First Class with M16A2/Mortar - %1", name westsoldier4], "plain down"]  

~4

titletext [format ["The Private with G36a - %1", name westsoldier5], "plain down"]

I need to hide the text for the disabled AI, but I don't know how...  Does anyone know what's up?

Thanks,

CIA  thumbs-up.gif

Share this post


Link to post
Share on other sites

try putting

?unitName alive:

before each instance of titleText.

Share this post


Link to post
Share on other sites

huh.gif

I just tried what you suggested and it did not work.  I tried the following and much more:

?westsoldier1 alive: titletext [format ["The Lieutenant with Steyr AUG - %1", name westsoldier1], "plain down"]

?unitName alive: titletext [format ["The Lieutenant with Steyr AUG - %1", name westsoldier1], "plain down"]

'unitName |#|alive:' Error Unknown Operator alive  -  is the error I get.

What's the deal?

Thanks,

CIA help.gif

P.S. This is only my second mission.

Share this post


Link to post
Share on other sites

You have your commands out of order.  It should be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? alive unitName: titletext [format ["The Lieutenant with Steyr AUG - %1", name westsoldier1], "plain down"]

The "alive" goes before the unitName not after.

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
Sign in to follow this  

×