Hello guys,
I'm trying to show on the screen the player name and how many monsters they killed. Like a realtime top five.
But I can't find any ACS command to access this info, also there is no way to access via ACS the intermission variables, like damage given?
I know that there is on ZDaemon GetPlayerInfo() PLAYERINFO_KILLS: the player's kill (NOT frag) count.
I'm almost giving up :/
[ACS] Show player kills or damage done
- NachtIntellect
- Forum Regular
- Posts: 480
- Joined: Mon Jun 11, 2012 9:20 am
- Location: Bienenstock, Germany
[ACS] Re: Show player kills or damage done
Hmm this is kind of a hacky way around but you could always create a pain state for said monster that gives the activator something that is either stored as an ACs variable or item the same can probably be done with the kill count just change it so on death it gives player said item or variable, this is just what I would do I never bothered using anything built in instead I just create it myself.
It's a bit tricky for me to explain right now since I haven't used ACS in a while but I've done something similar for the player alright so if you want to print a message on screen that shows the player name use Hudmessage and inside for the first argument use n:1 What this does is print the first players name if you want more than 1 players name just create another line and to change it to another players name just increase the number after n: by 1 then you just need to fill out all the other arguments a good trick to hide these numbers is to have an if statement using the PlayerInGame() function again I am a little rusty and it may sound confusing at first but I am still willing to help you out if I can.
It's a bit tricky for me to explain right now since I haven't used ACS in a while but I've done something similar for the player alright so if you want to print a message on screen that shows the player name use Hudmessage and inside for the first argument use n:1 What this does is print the first players name if you want more than 1 players name just create another line and to change it to another players name just increase the number after n: by 1 then you just need to fill out all the other arguments a good trick to hide these numbers is to have an if statement using the PlayerInGame() function again I am a little rusty and it may sound confusing at first but I am still willing to help you out if I can.
[ACS] Re: Show player kills or damage done
Everything sounds great, I'm still learning to code, but I get what do you mean.
So to accomplish this we should use DECORATE for the death/pain states and ACS to show on the screen. right?
So to accomplish this we should use DECORATE for the death/pain states and ACS to show on the screen. right?
- NachtIntellect
- Forum Regular
- Posts: 480
- Joined: Mon Jun 11, 2012 9:20 am
- Location: Bienenstock, Germany
[ACS] Re: Show player kills or damage done
Yeah, that is right what one of my friends and I have worked on and it's something like this you should be able to tell exactly how to use it:
I do also think that you might have to calculate exactly how much damage is done which is a little bit of a pain, there should be another way to tell how much hp a monster has lost when you shoot at it but I can't exactly remember the details.
Code: Select all
//In the death state I have ACS_ExecuteAlways(667,0,130,0,0) which gives the player 130 of the inventory item "money".
SCRIPT 667 (int amount)
{
if(amount>-1)
{
SetActivatorToTarget(0);
GiveInventory("money",amount);
}
}
[ACS] Re: Show player kills or damage done
Thanks I'll take a look.
If I can manage to show the kills on the screen, thats enough for me. No need to show damage then :)
If I can manage to show the kills on the screen, thats enough for me. No need to show damage then :)