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 / Health Help...i'm desperate

Author
Message
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 14th Apr 2009 06:32 Edited at: 14th Apr 2009 06:50
Ok so i've been trying to regenerate health and i found alot of things by searching. the problem is i'm trying to use it in a multiplayer game, i wanted to have an invisble health bar so it would be more like the COD health, i cant even get a damage hud to appear in MP, wen i get shot theres no red on teh screen , i've tried many methods, and making
1)health regenerate
2)Damage hud show
3)dissapearing health bar
seems impossible to me, please if u can help me in anyway please do.
here are some scripts i found on the site
I have no idea how to use any of these scripts in MP
I believe that was the Damage hud.
and thats the regeneration script
Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 14th Apr 2009 13:23
scriptings weird in multiplayer, trigger zones dont work so your best bet would be to attach it to a door script (somehow)

Not in cruelty, Not in wrath The Reaper came today;
An Angel visited this gray path And took the cube away.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 14th Apr 2009 15:31
...this might be of some assistance to you, thm120, and get you headed in the right direction:



It's theoretical, and still needs to be confirmed, but I have every reason to believe that health regeneration is possible in MP.


Attachments

Login to view attachments
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 14th Apr 2009 18:52
cool that is helpful, but "if players health is less than 500?" i hope i can change that to a lower number and still get it to work, now how would i make the hud that displays my health disapear?
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 14th Apr 2009 19:03
Also it cant be added to a weapon, the main script is only accessible in single player under the AI script section. so now it has to be an object that has the AI scipt section even in multiplayer
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 14th Apr 2009 19:26
...back to square one, I do suppose...


thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 14th Apr 2009 23:09
i'm getting frusterated, it seems there is no way to do cool things in Multiplayer
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 15th Apr 2009 18:31 Edited at: 15th Apr 2009 18:33
...FPSC always has been primarily a Single Player emphasised game engine.

Multiplayer, as it is right now, seems like something that was added almost as a placeholder, for possible code modification later.

It's been left bare-bones, due mostly to FPSC's notoriously poor framerate issues of the past. Perhaps some improvements might come with the migration. We'll just have to wait and see.

In the meantime, I'd keep exploring theoretical ways of acheiving the effects you're after. As stated above, adapting a door script might hold the key.

Feel free to use and adapt the script I've posted, as you see fit. Perhaps, you'll discover a workaround...

NOTE: Perhaps weapon pickups are hardcoded to use WEAPON.fpi, during Multiplayer gameplay, and that's why you can't make script changes in the properties editor. If so, here's a possible workaround:

1. Create your Multiplayer level, being certain to place 1 of the weapon pickups out of any player's range.

2. Build your Multiplayer game as normal, and compile.

3. Browse through YOUR GAME TITLE's folder tree, and locate the scriptbank folder.

4. Locate and delete the WEAPON.fpi file.

5. Paste MULTI PLAYER SLOW HEAL PICKUP.fpi file into scriptbank folder.

6. Rename MULTI PLAYER SLOW HEAL PICKUP.fpi to WEAPON.fpi

Theoretically, when you play the game, the modified script should now be called by the game engine.


Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 16th Apr 2009 00:30 Edited at: 16th Apr 2009 00:31
...but all the weapons will have that script too. That script would be used by every single pickupable gun. I suppose you could make "classes" and have no gun pickups and that would work(theoretically)

...
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 16th Apr 2009 05:25 Edited at: 16th Apr 2009 05:35
darn i got exceited too. i tried applying the script with single player then switching it to multiplayer in the preferences but didnt work eighter. ok for now i'l cross out Regeneration, how about the damage screen? i wanted there to be like a damage screen after a person gets shot but i cant make it appear in multiplayer games.

i got this script and have no idea how to use it, do i apply the script manually into the setup files after the game is built or is there a way to do it while still workin on the game?
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 16th Apr 2009 17:02 Edited at: 16th Apr 2009 17:06
Quote: "...but all the weapons will have that script too. That script would be used by every single pickupable gun. I suppose you could make "classes" and have no gun pickups and that would work(theoretically)"


...since regeneration would only occur if the player was below 500 HP, and the weapon pickup would add the weapon to the player's inventory like usual, I don't see how this would be a problem.

Adding back the original HUD and sound calls wouldn't be difficult to do, if retaining the original weapon pickup effect is desired.

Weapon pickups don't have to respawn. Even after everyone's been equipped with weapons, the regeneration (via that lone unreachable weapon pickup) should theoretically continue...

Quote: "...switching it to multiplayer in the preferences... "


...nope. Per your initial report, this won't work in MP.

Reread my previous post carefully, and you'll discover that the workaround I suggested involves creating YOUR GAME TITLE and manually replacing the WEAPON.fpi file with the one that I've supplied above...


Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 17th Apr 2009 00:07
@Seth Black: I didn't look at the script very well I suppose. That should have technically worked. I'm stumped.

...
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 17th Apr 2009 00:55
there is one problem i noticed tho, as u get closer to the weapon, the health increases faster, and i just tested you newest way and it works, i can pick up guns but cant really test if i regenerate
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 18th Apr 2009 16:16
Quote: "there is one problem i noticed tho, as u get closer to the weapon, the health increases faster, and i just tested you newest way and it works, i can pick up guns but cant really test if i regenerate"


...whoa. You have me totally confused. If you can't really test if you regenerate, how is it that you know that the health increases faster, as you get closer to the weapon?

The script that I shared above uses a timer, and checks to see if the player's health is below 500, so there shouldn't be an increase in regeneration.

It's set at a consistant 2 second timed delay, but that could be easily changed to any value that you want, as could the default 5 HP regeneration rate.

I would be more than happy to DL and join you in a Multiplayer game, and we could test this out. Create a test game. Post it here, and let's arrange a mutual time to play, if you're interested.


thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 19th Apr 2009 19:55 Edited at: 19th Apr 2009 19:56
whoops i tested it in single player and thats what i noticed, i havint tested the regen in MP, i would love to test the game wit ya right now but, i get the waiting to join error so, ima wait till knxrb gives me V2 of FPSC IP.

PS. i already enabled the ports for FPSC

Login to post a reply

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