Jump to content
Sign in to follow this  
tobmic

Kill Messages SP

Recommended Posts

Hi there

How can i make it when i kill an enemy that i get a message that Soldier XYZ has been killed + a counter how many i killed.

Share this post


Link to post
Share on other sites

Your murderous bastard ! :)

you can use triggers attached to the unit and set the condition to !alive. The trigger will activate on the unit death.

I guess you could spawn units and attach triggers to them using :

trigname attachTo[unitname,[0,0,0]]

for the counter, in the "on Activation" field, you could call a script that does something like _nbDeath = _nbDeath + 1 . But I dont know how you can have some kind of global variable. Perhaps an empty object with a property ? I dont know about that.

Share this post


Link to post
Share on other sites

Thanks for reply

Im not a murderer ...

Can you post a script that works global ?

Share this post


Link to post
Share on other sites
Thanks for reply

Im not a murderer ...

Can you post a script that works global ?

@ work, compiling stuff ;)

I can try tonight if someone didnt post any replies.

Share this post


Link to post
Share on other sites

Allright great :-)

Thanks alot

BTW is there some way to make a script that counts the kill messages backwards ?

For example i place 20 enemy Opfor units and each time one enemy is defeated it counts backwards with a Message on Screen

Share this post


Link to post
Share on other sites

The only thing needed would be a way to define a variable that is attached to your playable unit. i didnt find a way to do that yet.

Unless someones know a way to get the statistics. If you check your map and go under statistics, you see your killcount there. That must be accessible somewhere but i cant find it.

Share this post


Link to post
Share on other sites
or press "I" during a mission..

That does only work in Multyplayer for me ...

Anyone has ideas ?

Share this post


Link to post
Share on other sites

Not sure if this is exactly what you're after, but you can make a large trigger named unitsRemaining with "OPFOR present." Then you can get a count of the enemy units remaining in the trigger area with {alive _X} count (list unitsRemaining).

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  

×