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 / Is it possible to show the total number of enemies as a hud?

Author
Message
GraPix
User Banned
Posted: 10th May 2009 15:05 Edited at: 6th Jun 2009 08:43
Is it possible to show the total number of enemies as a hud? FOr Example: The hud will say "ENEMY" and its downside contains the number of enemies, say 10. When the plr shoots one of the enemies it reduce to 9 or 09 and so on.

This is very useful for quick battle games and games that contains hard-to-find enemies, letting the plr know that there is still an enemy, so the plr will stay interested in your game.

If any script that i can edit to work as this, plz let me know.
If any script already out there do this (or need little tweaking), plz let me know.
If you can script this, and you want to write for me, plz let me know.

"I am not a n00b, i am using fpsc for 4 yrs. but stopped using it after first 2 yrs bcz it was too buggy and very limited, then i come back to use this, and LOV this new upgrade and mods for fpsc out there"

-Grapix

Heres WHAT I CAN GIVE YOU IN RETURN:

HUD PACK 1
HUD PACK 2
CREATE YOUR LOGO
FLASH WEBSITE
HTML WEBSITE
FOTOFIX YOUR FOTO (HTTP://WWW.GRAPIXENTERTAINMENT.COM/FOTOFIX) THIS PAGE IS TEMPERORLY DOWN.
RESTORE YOUR PHOTO
ENHANCE YOUR PHOTO
MODEL YOUR FACE IN 3D
MODEL YOUR BODY IN 3D
DOMAIN NAME WWW.YOURNAME.COM
WEB SPACE
FLASH INTRO
ADDING MORE...

CONTACT: SHIVAM3D@YMAIL.COM (ATTACH SCRIPT TO YOUR EMAIL AND WRITE INSTRUCTIONS IN EMAIL)

IN CASE SOME GUYS HERE THOUGHT THAT WHAT IF THEY WRITE THE REQUESTED SCRIPT AND GET NOTHING. WELL, TO MAKE THIS MORE SECURE ARCHIVE YOUR SCRIPT FILE AND SET PASSWORD DON'T TELL ME THE PASSWORD, AFTER I WILL SEND YOUR CHOOSEN ^FROM THE ABOVE LIST, YOU WILL THEN TELL ME THE PASSWORD.

I REALLY NEED THIS... PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE...(note: these plz's are not copy pasted, they are written by hand)

ANYONE INTERESTED?


__________________________________________________________________

Visit my website --> GraPix Entertainment

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 10th May 2009 15:51
Yes, it is possible to do this. You'd need to use a global variable to track the total number of possible enemies available, and then whenever an enemy is destroyed subtract 1 from the global variable. Then just call the HUD that has the total number of enemies.

As far as a script to do this, I don't think one exists. I'd write it for you, but I'm busy with a few projects (unless you want to make it worth my while?).

Priest of the Church of Joe Wood
GraPix
User Banned
Posted: 10th May 2009 18:14 Edited at: 10th May 2009 18:19
@Leon Kennedy

Please, write it! i really need this, and i think every one wants to use this. I swear u gonna worth the time writing it.

sorry for my grammar, i'm not english.


GraPix Entertainment
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 10th May 2009 22:16 Edited at: 11th May 2009 00:49
Quote: "i really need this"

Have you tried writing this yourself? If so, can you show us the script that you are using and what problems you are having getting this done?

Quote: "i think every one wants to use this"

Actually, I think this is the first post I have seen with someone requesting it. So I don't think everybody wants this.

Again, I have a couple of projects on my plate that I need to work on. Which means I shouldn't be trolling the forum, but that's another story. I just don't have time to write this for you.

Edit: I'm not trying to be a dork, or stand-offish, or anything like that. I just don't have a whole lot of time right now to devote to something that I'm not sure the entire community wants. If there is a lot of interest in this, and enough people want it, then maybe I can squeeze this in. Maybe.

Priest of the Church of Joe Wood
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th May 2009 08:45
I think the "HUD that has the total number of entities." will be the hard part with the official FPSC.


To make this a little more efficient, you could also change the Appear scripts to increment the variable as well as have the destroy scripts decrement it. This will make sure any newly spawned enemies are accounted for.



The one and only,


GraPix
User Banned
Posted: 5th Jun 2009 11:30 Edited at: 8th Jun 2009 08:07
*bumb* i need the script

EDIT: lol its a typo *bumb* i meant *bump*

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
GraPix
User Banned
Posted: 5th Jun 2009 12:03 Edited at: 6th Jun 2009 08:41
Heres WHAT I CAN GIVE YOU IN RETURN:

HUD PACK 1
HUD PACK 2
CREATE YOUR LOGO
FLASH WEBSITE
HTML WEBSITE
FOTOFIX YOUR FOTO (HTTP://WWW.GRAPIXENTERTAINMENT.COM/FOTOFIX) THIS PAGE IS TEMPERORLY DOWN.
RESTORE YOUR PHOTO
ENHANCE YOUR PHOTO
MODEL YOUR FACE IN 3D
MODEL YOUR BODY IN 3D
DOMAIN NAME WWW.YOURNAME.COM
WEB SPACE
FLASH INTRO
ADDING MORE...

CONTACT: SHIVAM3D@YMAIL.COM (ATTACH SCRIPT TO YOUR EMAIL AND WRITE INSTRUCTIONS IN EMAIL)

IN CASE SOME GUYS HERE THOUGHT THAT WHAT IF THEY WRITE THE REQUESTED SCRIPT AND GET NOTHING. WELL, TO MAKE THIS MORE SECURE ARCHIVE YOUR SCRIPT FILE AND SET PASSWORD DON'T TELL ME THE PASSWORD, AFTER I WILL SEND YOUR CHOOSEN ^FROM THE ABOVE LIST, YOU WILL THEN TELL ME THE PASSWORD.

I REALLY NEED THIS... PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE...(note: these plz's are not copy pasted, they are written by hand)

ANYONE INTERESTED?

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Jun 2009 08:58
Ok man, here it is but its free.

This consists of three scripts. (took Ply's advice about spawns)

Death Count Appear - Assign this
as the appear script for the enemies being counted.

Death Count Destroy - Assign this
as the destroy script for the enemies being counted.

Death Count Display - Assign this
to an invulnerable and immobile entity such as blood-splat.
Then set the Static Mode to NO.
Then set the Always Active to YES.
Then rename the Blood-Splat to dcd. (short for death count display)
You must name the blood-splat to "dcd" (minus quotes) or the scripts will not work.

I assume you know how to set up characters for a spawn, but if you run into trouble then I will share the settings used in the video attached.

Have Fun!

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Jun 2009 09:10 Edited at: 7th Jun 2009 09:24
Oh yeah, I almost forgot; you will need the numeric huds from my FPSC Cash System for this to work.

In case you didn't notice in the video... the counter display is at the top of the user's screen in the middle for this example.
I'll let you create your own hud for the "Remaining Enemies", "Enemies Remaining", or however you want to word it.
The example uses no heading but you know it is an enemy count.
I dunno why I called it death count, but its done now.
Oh well, I guess it tells me how many deaths await me, since that is what we do to enemies...kill kill kill!
I'll fix the name if I bother to make a thread for it.
No biggie though, since the Heading HUD can say anything and thats all the user will see anyway.

Here is a picture of the settings used for the blood splat and the enemies.
I changed the delay times for enemy spawns for the video (300 to 800), but this gives you the idea.

Attachments

Login to view attachments
GraPix
User Banned
Posted: 7th Jun 2009 11:43 Edited at: 7th Jun 2009 12:03
I LOVE YOU Conjured Entertainment. I'M GONNA KISS YOU.

YOUR THE BEST...

Thanks for all the time you spent and efforts you did while writing this script, the time it took to press PRINT SCREEN and edit the scenary, the time and effort it took you to record screen video and especially the wonderful script you wrote for me.


(What is your email? If you don't want to post it here, send a blank mail to shivam3d@ymail.com or admin@grapixentertainment.com.)

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Jun 2009 18:29
Quote: "Thanks for all the time you spent and efforts you did while writing this script, the time it took to press PRINT SCREEN and edit the scenary, the time and effort it took you to record screen video and especially the wonderful script you wrote for me."

No problem.
I whipped this up pretty quick by canibalizing a timer script, and editing stock appear and destroys.

Quote: "I LOVE YOU Conjured Entertainment. I'M GONNA KISS YOU."

I hope you are a girl.
If not, then that statement is a bit awkward.

Quote: "What is your email?"

I'll send yuo an email, bt I already told you that you don't have to give me any of the things you were going to trade.
I may need a favor at some point, and then maybe you can help me out.

GraPix
User Banned
Posted: 8th Jun 2009 07:45 Edited at: 8th Jun 2009 07:52
@Conjured Entertainment I cannot help you for TGC Points because i don't even have a store account and Points. I don't know ANYTHING about points. How to help you out? Please Answer, if will be able to do you are ecepting from me, i will sure do it....

Again Thanks for script....

EDIT: i have a store account

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 8th Jun 2009 08:57
Quote: "@Conjured Entertainment I cannot help you for TGC Points because i don't even have a store account and Points. I don't know ANYTHING about points. How to help you out? Please Answer, if will be able to do you are ecepting from me, i will sure do it....

Again Thanks for script....

EDIT: i have a store account"


Quote: "I may need a favor at some point,"


I think you miss read.

GraPix
User Banned
Posted: 8th Jun 2009 09:15
@CE can i use this script in commercial project?

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
GraPix
User Banned
Posted: 8th Jun 2009 09:27 Edited at: 8th Jun 2009 11:32
it does not worked. I am using trigger to spawn enemy, when i enter the trigger the whole screen turn to like this -> SS Attached. And it remains until i press escape...

Help!

EDIT: I created a blank new level to test it (without triggers to spwn entity) but after killing the enemies when i get close to his dead body (after disappearing) it respawns and my screen goes like this --> attached and remains until i press escape.

No Counter is displaying in the top middle of my screen.

Please Help!!! (i've installed your FPSC Cash System and i also copied languagebankenglishgamecorehuds USER folder to gamecorehuds)

EDIT: I have vanilla FPSC 1.14. I hope this script not requires a mod.

Your signature has been erased by a mod - please make it no larger than 600x120, thanks

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Jun 2009 17:36 Edited at: 8th Jun 2009 18:03
Quote: "@CE can i use this script in commercial project?"

Yeah, and you can modify it too as long as you leave the top line.

Quote: "EDIT: I have vanilla FPSC 1.14. I hope this script not requires a mod."

Vanilla???
What is that a mod?
I only use the stock engine and if you are using a mod then ask the creator of it why it doesn't work.

I have explained to you how I set my test up, so there is nothing else I can say about the setup except to repeat myself.

Quote: "Please Help!!! (i've installed your FPSC Cash System and i also copied languagebankenglishgamecorehuds USER folder to gamecorehuds)"

Your huds should be in the following path.. (languagebank/english one not the other)

C:/Program Files/The Game Creators/FPS Creator/Files/languagebank/english/gamecore/huds/user

The script does not need to specify the languagebank english part because it defaults there.
So, you should not have the user huds in the other gamecore path.
Try removing that and see if it helps.
It seems as if it is not finding the huds, or the display would work if you have the appear script assigned for the characters.
Do not type in the path when reassigning scripts in the editor, use the little browse button to locate them instead. (that can cause problems)

Show me picks of how you have the charaters properties and the bloodsplat or whatever entity you used for the display script. (like the ones i posted above)
I need to see what you have going on in order to help.

It maybe the trigger that is causing the problem somehow, so I will test that.

Edit
I tested a trigger spawn and it worked fine for me.
Again, I think it is a hud prolem if you have the scripts assigned properly.
I do not know why you copied the user folder to the gamecore that is not in the languagebank. (that was not in the instructions)
That is probably what is causing the problem, so let me see a pic of your user folder in windows explorer so I can see the path.

All I know is it works for me.
Can anyone else test this and see if you have problems too?
I am still confused on the vanilla part, because I searched it and came up with only stuff for DBP not FPSC.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 8th Jun 2009 19:17 Edited at: 11th Jun 2009 17:29
Quote: "...vanilla..."


...he means stock FPSC, Conjured Entertainment.

EDIT: Whoops! I stand corrected.

It seems that it's become part of the lexicon...

GraPix
User Banned
Posted: 8th Jun 2009 19:25
I will upload the screenshots later (i am using PDA). For the vanila thing it means that i am using official version of fpsc (no chocolate stuff like mods). Anyone else try this plz?

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Jun 2009 21:17
Did you try it Seth?

If it works for someone else, then maybe you guys can explain the setup to him better than I did.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Jun 2009 04:41
Quote: "Vanilla was a term coined by Plystire, awhile back."


It was?!? Well, that's news to me.

I appreciate the thought, but someone else started using it before I did. I believe Nickydude or Thraxas were the first ones that I saw using the term.


The one and only,


GraPix
User Banned
Posted: 9th Jun 2009 08:28
Here is the properties -> DOWNLOAD (file attached)

Your signature has been erased by a mod - please make it no larger than 600x120, thanks

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jun 2009 08:47
I thought you said you were spawning him on a trigger?

You would not have Spawn at Start set to Yes if you were using a trigger.

Also, you have "Max at any Time" set to zero, so he cannot spawn at all.
And you have Max Spawn set to one so he will only spawn once which is fine for a trigger, but since you spawned at start the trigger won't work.

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jun 2009 08:56
Here is a picture of the proper way to set him up for a trigger spawn.

1) First you will note that he has a unique name.
That is because the trigger needs to use that name in its 'Ifused' field.
The trigger also needs to use the plrinzoneactivateused.fpi, not the default plrinzone.fpi script for its main ai.

2) "Spawn at Start" is set to "NO"
That is because we want him to spawn by the trigger not at start.

3) "Max at any time" is set to "1"
That is so we only have one instance of Ralph at any one time.

You will also notice that I set the "Maximum Spawn" to "10" so you can see the counter working more than once.

I also set the "Number to Spawn" to "1" since we only have a Max at any time set to one.
If that number were higher then we could spawn more than one at a time with the trigger.

Just set him up like this and then make changes with the delay and the "Maximum Spawn".
You have to have the numbered items (1-3 above) set like that though if you want the trigger spawn to work.
Once again, don't forget to change the main ai of the trigger zone to plrinzoneactivateused.fpi

See if this helps.

Attachments

Login to view attachments
GraPix
User Banned
Posted: 9th Jun 2009 08:59 Edited at: 9th Jun 2009 09:01
Thank you sooo much for your help and support...

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Jun 2009 09:01 Edited at: 9th Jun 2009 09:03
I used a mix of both characters (static and spawned) at the same time for my test, and they all worked fine.
If you want it to work off a trigger then test it that way.
No sense in having to do it all over again.

Quote: "Thank you sooo much for your help and support..."

No problem.
I hope you get it working on your end.

GraPix
User Banned
Posted: 9th Jun 2009 09:31 Edited at: 9th Jun 2009 09:32
i got it working....

the problen was in the name of script, I named your scripts deathcount1.fpi, deathcount2.fpi and deathcount3.fpi and it was not working, then i just renamed to: deathcountappear.fpi, deathcountdestroy.fpi, deathcountdisplay.fpi...

And Voila!!!!

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 10th Jun 2009 04:09 Edited at: 10th Jun 2009 04:11
Quote: "i got it working...."

GREAT!

Quote: "the problen was in the name of script, I named your scripts deathcount1.fpi, deathcount2.fpi and deathcount3.fpi and it was not working, then i just renamed to: deathcountappear.fpi, deathcountdestroy.fpi, deathcountdisplay.fpi...

And Voila!!!!"

Uh, I guess I should have been more specific about the naming convention in the instructions. (widening the properties box in the last pic helped, eh?)
Sorry about the confusion, but I am glad you got it working.

Have Fun!

GraPix
User Banned
Posted: 15th Jun 2009 13:54 Edited at: 15th Jun 2009 17:28
@Conjured Entertainment: i am using trigger to spawn my enemies. but the counter displays only current no of enemies. I want it count the enemies that are not spawned too.

@other members: sorry for bumping old thread

EDIT: other members can also answer if they know the answer of the question stated above.

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Jun 2009 21:05 Edited at: 15th Jun 2009 21:31
You will be limited to 20 total characters using the display script that I gave you.
So, tell me how many characters you have for a total and I will edit that for you if you can't figure out how to.
Remember though that I used a straight forward approach to the display, so if you have a high number of characters then the script may go over the line limit.

How many characters do you have in the level?

I made this new display script that will initialize the variable to the total amount of characters (including spawns) for the level.

Here is the
for the new display.

It handles up to 50 total characters.
You will need to set the variable for your total in the intialization part of the script, which I list below with the number in bold...

;initialization
:state=0:globalvar=33
:state=0:setvar=50,activate=13,state=4
:state=4,activated=13:activate=0,state=5
:state=5:state=6

If you are using too many characters then the script will go over the line limit, so let me know if you use more than 50.

With this script you can do away with the custom appear scripts earlier, so set the characters APPEAR AI to one of the stock appear script.
You still need to use the destroy and of course the new display script, which will replace the old one for the entity used for the display.

GraPix
User Banned
Posted: 16th Jun 2009 12:13 Edited at: 16th Jun 2009 15:16
Quote: "How many characters do you have in the level?"


SIX(6)

Again, file name mistake.... plz let me know what is the name of your NEW display script?

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 16th Jun 2009 22:34 Edited at: 16th Jun 2009 22:45
Yeah, 6 characters total is way less than 50 so that script should work fine, just change that 50 to 6 in state=0.

The name shouldn't matter and you can call it anything you want as long as you navigate to that in the entity's properties.

You don't have to do that though if you use the same name.

So, rename the old script, then have the old name for the new script.

That way you don't have to change the entity's settings for it since it calls that name already.

So, rename the old one to something like deathcountdisplay_old.fpi, then name the new one deathcountdisplay.fpi.

GraPix
User Banned
Posted: 17th Jun 2009 11:34
No, its not working... Whenever any of the enemies i wanted to count dies, it shows a strange eyehud or whatever u say.
(attached)

Your signature has been erased by a mod - please make it no larger than 600x120, thanks

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 17th Jun 2009 17:02 Edited at: 17th Jun 2009 17:33
Quote: "No, its not working... Whenever any of the enemies i wanted to count dies, it shows a strange eyehud or whatever u say."


Well, it works on my end.
The attached video shows 4 characters spawned at start and 2 spawned by triggers, so I know it works both ways.
Each charatcer that spawns is uniquely named since they are spawned by separate triggers and each charcter only spawns once.

It looks as if we have the same problem as before when looking at your screenshot, so it must be a naming thing where it can't find the script. (like before)

All you needed to do was ...

1) Replace the old display script with the new one keeping the old name.

2) Reassign the appear scripts on the characters from the custom ones used before back to the stock ones.

You don't need to change any names of the scripts, which is what you did so now its not calling the right one so it can't find it again.
Make sure your display entity is still named dcd because the destroy scripts can't activate it if you changed its name, unless you made the change in the script too.

Tell me what you did this time (changes made) and I will see if I can figure it out.

Also give me a screenshot of the entity properties. (showing full paths)

Attachments

Login to view attachments
GraPix
User Banned
Posted: 18th Jun 2009 12:58
now, its showing number.. yay!!

but i have only 6 enemies and it says 56...

Your signature has been erased by a mod - please make it no larger than 600x120, thanks
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 18th Jun 2009 19:43
Show me that initialization routine from the display script so that I can see the changes you made.

Make sure you did not accidentally leave the 5 in when you replaced the 50 with your 6.

Login to post a reply

Server time is: 2024-11-25 02:30:49
Your offset time is: 2024-11-25 02:30:49