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 / Don't know if this could be useful to anyone...

Author
Message
SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 11th Oct 2010 16:11 Edited at: 11th Oct 2010 18:37
Here's a ragdoll script with a 4-second fade and in all that time, shows a HUD that lasts until they fade away. Here it is.



Please put me in your credits if you used this script.

EDIT: YouTube Video: http://www.youtube.com/watch?v=__NGNbG6o7w

Why does life suck the life out of you?
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 11th Oct 2010 18:19
...thanks for the script concept. This will be useful to folks, no doubt.

It needs some tweaking, before the HUD will function. As is, the HUD hasn't been defined or created, prior to being called in state 3.

NOTE: I've never tried it, but a notion just popped into my head.

Would a script such as this work properly with a triggerzone or dynamic entity scripted to function solely as a type of global HUD generator, for the level?

If so, it would simplify customizing kill HUDs for multiple enemies, tremendously.

SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 11th Oct 2010 18:28
@Seth Black, no, I'm pretty sure it wouldn't, unless one of the pro coders of the board want to step in and edit it. But this was meant as a indicator that you killed somebody. BTW, I saw that I didn't define the HUD, thanks for correcting me. I'm not on my Dev computer, but if I was, I would've C&P'd the script.

Why does life suck the life out of you?
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 11th Oct 2010 19:11
...much better now, SecretiveOps. That works nicely, with the correction.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Oct 2010 01:20 Edited at: 12th Oct 2010 02:05
Your script is almost exactly like the one I posted in the Scripts List thread over a month ago. (1 second added to the timer, and added a HUD)

I'm not even sure why your HUD is being displayed since you never even go to state=10 to have it created.
Well, other than I suspect your effect was only working in the video because some other script running had created the HUD.
If not, then this is a nifty thing that the huds can be created without ever calling a state as long as it appears above state=0. (I'll have to test this later)

That line could be state=0 without the state=0 call at the end, like so...

:state=0:hudreset,hudx=50,hudy=50,hudimagefine=\gamecore\huds\YOURHUD.dds,hudname=HUDNAME,hudhide=1,hudmake=display

I suggest getting rid of that space in front of the hudunshow=x action as well, because those spaces are unwanted and can cause trouble.
I would probably move it up to state=2 when the timer is reached but that is just me and it should be okay where it is.



Quote: "Would a script such as this work properly with a triggerzone or dynamic entity scripted to function solely as a type of global HUD generator, for the level?

If so, it would simplify customizing kill HUDs for multiple enemies, tremendously."

Any script should be able to create the HUDs all together, and then any script in the level could show or unshow the HUD.
It would be easier to edit the one script instead of hunting through all of the destroys or mains, so yeah, good idea Seth.

   Conjured Entertainment

 WARNING: Intense Madness
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 12th Oct 2010 02:04 Edited at: 12th Oct 2010 02:05
post error

   Conjured Entertainment

 WARNING: Intense Madness
SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 13th Oct 2010 02:23
@Conjured, I was on my mother's office computer when I posted that, so there could be a little error. It works because when you destroy the entity, it hides the HUD, but when you kill another entity, it shows it without having to execute another action. Personally, I think this is a little more efficient than having a HUD disappear and reappear.

Why does life suck the life out of you?
Michael Thompson
16
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Behind you (if not, in australia)
Posted: 13th Oct 2010 13:08
If I do not want it to fade, would I just change state 3 to this?
:state=3,alphafadeequal=100:state=4,destroy

Windows 7 ultimate x64, Intel i7, 4 GB RAM, NVIDIA GEFORCE 330m 1GB
Flash Star Game Creations
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 13th Oct 2010 21:22 Edited at: 13th Oct 2010 21:23
Quote: " It works because when you destroy the entity, it hides the HUD, but when you kill another entity, it shows it without having to execute another action."

I know a little bit about FPI scripting, so when I said I didn't understand why it was doing something it wasn't because I don't know how the script should work.
I meant that I did not know why it was doing something that it wasn't scripted to do. (the HUD was never created before it was shown)
state=10 creates the HUD, but nothing ever went to state=10 to do that, and it isn't supposed to be able to show it until after it is created.
That is why I said I am confused as to why it even displayed the HUD to begin with, because it had never been created.

   Conjured Entertainment

 WARNING: Intense Madness
SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 15th Oct 2010 22:59
@Michael Thompson: No, you would remove the fading part altogether. Just try to keep the etimer. And the HUD commands.

Why does life suck the life out of you?
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 17th Oct 2010 16:02
@Seth, yeah that would work. I've done it before, using numeric huds.

My karma ran over your dogma.
SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 29th Oct 2010 01:44
Yeah, Seth, objects could be a global hud generator. Just make a new timer so other scripts can see it, and just make the huds come at intervals. I made three barrels hold my CoD health script, regen health script, and ambience control script. Off-topic: In the three weeks I've been participating in these forums, I've gotten pretty nifty with this FPI coding.

Why does life suck the life out of you?

Login to post a reply

Server time is: 2024-11-24 16:40:43
Your offset time is: 2024-11-24 16:40:43