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 / Timer, Counter, Kill

Author
Message
Mr Flowerkohl
19
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Deutschland - Germany
Posted: 1st Sep 2007 03:34
Hi

I wonder if its possible to display a kill-counter within the hud.
if you kill an enemy, it increases.
lets say you got to kill 30 enemies in a level to continue. visually displayed on top of your hud.

and together with that feature, is it possible to show another counter...a countdown ? that you got 5 minutes for example to kill those 30 enemies ? visually displayed as a down counting number ?
i know ive seen this script a looong while ago...over a year.

yeah...thats the ticket !
Goodman84
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 1st Sep 2007 21:36
I've seen a timer to win but not a timer that regains when you kill, But considering the first 1 works I can't see why not, I'm sure its possible, sorry I don't know how tho lol.

hey
Mr Flowerkohl
19
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Deutschland - Germany
Posted: 2nd Sep 2007 23:11
hmmm.... would be very nice if one of our code gods could help

yeah...thats the ticket !
Mr Flowerkohl
19
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Deutschland - Germany
Posted: 6th Sep 2007 15:13
anyone ?

yeah...thats the ticket !
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 6th Sep 2007 15:23
Yeah the countdown script i know that one.

But i dont know if it is possible with the timer
for the enemies.

And also would like to know if this is possible.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 6th Sep 2007 17:05 Edited at: 6th Sep 2007 17:06
I'm certainly not one of the code gods, but this is my take on it.

First, you'll need to make a hud for everything that will be displayed. 10.. 9.. 8.. 7.. 6 etc

Then you need to create a script that counts the time down. It can be done, but you must remember two things. (at least!)

1. Only one timer will run at a time. If you use any other script in the level which uses the timer, the clock will be reset.

2. In order to make the count down script with the limited .fpi language, (and I use the term language loosely, I really should say script) you will need many, many, many loops of :TIMERGREATER=[NUMBER]:STATE=[NUMBER],HUDSHOW=[HUDNAME], etc. And don't forget that you need to initialize each hud in the beginning of the script.

As for the kill counter, someone else has already done that. Look here.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Mr Flowerkohl
19
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Deutschland - Germany
Posted: 6th Sep 2007 17:52
Thanks a lot xplosys, i think a level countdown could be made
very easily with your method.

But as for the kill counter, i meant something else,

you start a level, in your hud is a number..."0", so you havnt
killed any enemy yet. If you shoot one, the number increases to "1"
and if you shoot the second, it increases to "2" and so on.

know what i mean ?

a visually displayed number of how many enemies you killed so far.

yeah...thats the ticket !
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 6th Sep 2007 18:19 Edited at: 6th Sep 2007 18:19
Well I think the method to count the kills is already done, as linked to above. Again, you will have to create the hud images. The word "KILLS" with the number "1" below it, "KILLS" with the number "2" below it, etc. You will then alter the script to display the proper hud each time incstate=1 occurs.

if state=1 and incstate=1 occurs, then state=2,so state=2:SHOW THE PROPER HUD .

Best.

I'm sorry, my answers are limited. You must ask the right question.

Login to post a reply

Server time is: 2024-11-23 20:34:24
Your offset time is: 2024-11-23 20:34:24