XSketz Posted December 5, 2011 Share Posted December 5, 2011 Is there a way (mod or otherwise) to display the number of kills a player has made? I play Co-Op Firefight (30 enemies) with my gf & we wld like to keep track of either/both the number of kills by each team member and/or total killed thus far. Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted December 5, 2011 Share Posted December 5, 2011 Not too complicated. Open IGOR, go to the 'Script' button, and click it. Click Import, and find the (coop) firefight gametype. Import it. Now add a new script block in with the trigger as 1 second has elapsed. The responses should be QueueLoopActorsInPlatoon. To select the players' platoon, click 'Query' under the platoon tab and find 'GetPlayerPlatoon' in the list. Now, create a new group and call it something like Display Score Loop, and click OK. Make a new script block and set its group to the Display Score Loop group. The trigger event should be LoopActors. Now, make a new ActorRef called This Actor or Next Actor or something. Select your new actorref for the LoopedActor. Then, for the responses, add BlockPreserve, and DisplayMessagePlayer, and set the player to your actorref, like This Actor. And for the message, select ConcentrateStrings. Start should say something like 'You have ' and make sure there is a space after 'have'. Now, for 'end' click edit, then select 'ConcentrateStrings' again. For start, click Query and find GetKillsActor, and set the actor to your actorref, This Actor. For end, type in ' kills', and make sure that kills has a space before it. Now it should read something like this: Display ("You have " + (((The number of kills for This Actor) as text) + " kills.")) to This Actor. You can do some fancier things that make it only display their score when it changes, but that's kind of complicated. If you'd like, I can make a script for you and your girl to use. Good luck. Quote Link to comment Share on other sites More sharing options...
Operative Posted December 5, 2011 Share Posted December 5, 2011 Well, I think it's possible to make the game check if the new kill number to be displayed is greater than the previous. If it is, then the game displays it. If it is not, then no message is shown. Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted December 5, 2011 Share Posted December 5, 2011 I did the 'show score only if changed' thing in my 'Flyswatter' SP mission in Claiming Liberty. Only problem with that method is that it only works for the number of kills for the entire player platoon, not for individual players. The way it works is like this: Group: <Default> Comment: kill checkup Trigger Event: 2 second(s) elapsed. Responses: Allow this block to be reactivated. Continue executing responses if ((The number of kills for the Player Platoon) is not equal to (The value of Counter - Current)). Display ("Your current score is " + (((The value of Counter - Player Score) as text) + " points.")) to all players. Set Counter - Current to (The value of Counter - Player Score). Works like a charm. Just add a block like that into any gametype, and the player's total kills is displayed. Quote Link to comment Share on other sites More sharing options...
XSketz Posted December 6, 2011 Author Share Posted December 6, 2011 Not too complicated. Open IGOR, go to the 'Script' button, and click it. Click Import, and find the (coop) firefight gametype. Import it. Now add a new script block in with the trigger as 1 second has elapsed. The responses should be QueueLoopActorsInPlatoon. To select the players' platoon, click 'Query' under the platoon tab and find 'GetPlayerPlatoon' in the list. Now, create a new group and call it something like Display Score Loop, and click OK. Make a new script block and set its group to the Display Score Loop group. The trigger event should be LoopActors. Now, make a new ActorRef called This Actor or Next Actor or something. Select your new actorref for the LoopedActor. Then, for the responses, add BlockPreserve, and DisplayMessagePlayer, and set the player to your actorref, like This Actor. And for the message, select ConcentrateStrings. Start should say something like 'You have ' and make sure there is a space after 'have'. Now, for 'end' click edit, then select 'ConcentrateStrings' again. For start, click Query and find GetKillsActor, and set the actor to your actorref, This Actor. For end, type in ' kills', and make sure that kills has a space before it. Now it should read something like this: Display ("You have " + (((The number of kills for This Actor) as text) + " kills.")) to This Actor. You can do some fancier things that make it only display their score when it changes, but that's kind of complicated. If you'd like, I can make a script for you and your girl to use. Good luck. Internet is down @ home. I tried doing both methods but got stuck using both methods. Could you please make either or both scripts for us. Thanks much. Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted December 6, 2011 Share Posted December 6, 2011 Sure, I'll get them up Quote Link to comment Share on other sites More sharing options...
XSketz Posted December 13, 2011 Author Share Posted December 13, 2011 Sure, I'll get them up Hey rileyfletcher_01, any luck yet??? Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted December 13, 2011 Share Posted December 13, 2011 I'm so sorry about this, I've been really busy here lately, and totally forgot about it. I've got three projects in scripting going: an addon for CL, my TXM mod, and a mission addon for CENTCOM, and I had a computer virus yesterday. I'll be back from work later, and I'll get it up Quote Link to comment Share on other sites More sharing options...
Tinker Posted December 13, 2011 Share Posted December 13, 2011 This may work, just a rough attempt at keeping the score for each player. Messages would be needed. Group: <Default> Comment: Trigger Event: The simulation is starting. Responses: Set Players to (The player-controlled platoon). Use SET PLAYERS to loop over all actors in Players after this block. Group: SET PLAYERS Comment: DROP Trigger Event: An actor loop is ready to process Next Player. Responses: Allow this block to be reactivated. Increment Players. Set Player 1 to Next Player. Continue executing responses if ((The value of Players) is less than 9). Continue executing responses if (Next Player is not equal to Player 1). Set Player 2 to Next Player. Continue executing responses if ((The value of Players) is less than 8). Continue executing responses if (Next Player is not equal to Player 1). Continue executing responses if (Next Player is not equal to Player 2). Set Player 3 to Next Player. Group: <Default> Comment: Trigger Event: Anyone has been killed. Responses: Allow this block to be reactivated. If ((The shooter who killed Anyone) is equal to Player 1), stop and queue a call to Player 1 Score. If ((The shooter who killed Anyone) is equal to Player 2), stop and queue a call to Player 2 Score. Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted December 15, 2011 Share Posted December 15, 2011 I'll rig up a script like that for you at noon, XSketz. Of course, you know you can just check the leaderboard and it will show you your total kills.....do you want it to show the score for each player? Hmm...your script didn't work, Tinker. It might be on my end though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.