Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Display a hud after certain number of kills?

Author
Message
Dan121
14
Years of Service
User Offline
Joined: 15th Sep 2010
Location:
Posted: 1st Jan 2011 22:23
i did a search and couldnt find what i wanted. Sorry if this is a very noob question im sure this is prob very easy to do but im not sure how. Basicly i want a hud to appear after a certain number of NPC'S have been killed. Im not asking for someone to just hand me a script im more than happy to put the work in im just hopeing someone could give me an idea of how to start.

Tanx Guys
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Jan 2011 04:52
Increment a variable in the enemies' death scripts. In a seperate script (probably attached to a triggerzone), check this variable for when it reaches a certain number, then display the HUD.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Dan121
14
Years of Service
User Offline
Joined: 15th Sep 2010
Location:
Posted: 2nd Jan 2011 17:05
Thank you very much Plystire for the help i shall have a go at it
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 18th Jan 2011 07:02
Does anyone know if FPSC can differentiate between kills performed by the player and those performed by AI team-mates?
I don't think it can, but I'd like to be proved wrong.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Jan 2011 23:23
Hmmmm, that is indeed a tough question... I can think of a way, but it may require PB to do...

There is a condition that PB has called "shotbyweap=X", but if you leave X blank and just use it as "shotbyweap" (exclude the "=X" part) it should return TRUE if the entity has been shot by the player... now, this part I'm not sure about, but it's worth a try! If you put the "shotbyweap" condition in the enemy's death script, it may ONLY return TRUE when the enemy was killed by the player, and not by the AI.

If anyone can give it a try, I'd like to see if it works or not.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 19th Jan 2011 07:00
Cheers. It's not quite the functionality I was hoping for, but it's still interesting. I was hoping FPSC could tell which of my 3 AI-team-mates shot the bad guy, but nevertheless this still may help me.

I am planning on using PB in my game, but I just wanted to see how far I could push vanilla FPSC.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Login to post a reply

Server time is: 2024-11-24 13:42:37
Your offset time is: 2024-11-24 13:42:37