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 upgrade script.

Author
Message
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 12th Jul 2011 22:58
well so... this is the container that should give the health upgrade to the player.





and this is the healthpack that work's as the upgrade.



so, does "plrsethealth=x" still works ? am i using it in a wrong way ?

this is what i got so far, why isn't it working guys ?

mods for creating a inteligent game,at least
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 13th Jul 2011 07:47
It should work. Have you changed the maximum player health from the default of 500 to 1000 in the player's start location (the green arrow)?

If the maximum health is set at 500, then using plrsethealth will be capped at 500.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 14th Jul 2011 00:44
there's no script that changes the maximum player's health in the middle of the game so ? man, that's bad !

mods for creating a inteligent game,at least
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 14th Jul 2011 07:36
It's true that the maximum health cannot be adjusted, but there are fudges that overcomes this.

1) set player's maximum health to a huge number, like 10,000,000.
2) then create a script for a trigger zone that does the following:
- defines a variable called something like "MaximumHealth",
- initially set this to 500,
- then, using the FPSC internal variables, check if the player's health is above MaximumHealth and, if it is, set the player's health to equal MaximumHealth.

You can then adjust the MaximumHealth variable via other script allowing the player's maximum health to be increased to 1,000.

i hope this helps.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 14th Jul 2011 17:36
humm... that'll require a little more studing and practice in the scripting language, emm... it might take a while untill the script is ready, ok ? and thanks !

mods for creating a inteligent game,at least
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 14th Jul 2011 17:49
I think someone else already created a similar script, have a search and see what you find.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 14th Jul 2011 18:01
::dimvar=maximumplrhealth
:state=0,plrhealthgreater=400:setvar=1000,addvar=500,playertake,state=1

am i close ?


mods for creating a inteligent game,at least
gendestroier
14
Years of Service
User Offline
Joined: 5th Jun 2010
Location: Brazil
Posted: 14th Jul 2011 19:54
it works! it works !

so here's what i did.

i've used this script bellow in one triggerzone that needs to be located where the player is, now, the player's maximum health is equal to 10000, i wanted the main start health to be equal to 500, them when he takes the biomod, it set's his health to 1000, yeah, and now what ? i'll tell you what !.



i've used this script bellow to make the player's health aways return to 1000 if the health is greater than 1000, those two scripts create another value for the player's health, equal to 1000.



the biomod script didn't changed a bit.

but i've faced another problem, the healthpacks in the level will aways been taken untill they reach the main player's health limit, that's 10000, so i needed to create another script for the health packs, and here it is !



so like this, the player won't take the medkit or gain any health if its health is greater than 1000, them you think, but if the player's health is equal to 999 the medkit will add him 200 points and the player will have 1199 health points ! nah son ! he won't because it enters in conflict with the other script that says that any health bigger than 1000 is replaced to 1000, so it doen't trepass this value.

mods for creating a inteligent game,at least

Login to post a reply

Server time is: 2024-11-24 06:55:16
Your offset time is: 2024-11-24 06:55:16