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 / My First Script

Author
Message
Cyberwolf
16
Years of Service
User Offline
Joined: 18th Jul 2008
Location:
Posted: 19th Jul 2008 21:54
I'm fairly new with how to script, but I tried...
This is my first script. It's probably not very useful, but maybe I could develop it.


;Artificial Intelligence Script

;Header

desc = keep health same

;Triggers

:plrwithinzone=1:state=1,plraddhealth=-1
:state=1:plraddhealth=2



Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 01:47
Hmmmm, that's certainly a roundabout way of doing things.

Perhaps if you ignored using "state" and just stuck with a single line that checked if the player was in the zone and if they are then increase their health.

That would heal the player while they are inside of the zone.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 04:38
Doesn't fpsc already have a script to do that. "plrhealinzone.fpi"??? Still, this a very good first script. Keep up the good work.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 05:07
That's true, Hybrid, but Lee made that script, not him.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 05:21
I was only stating that is is a great script, but a little redundant.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 21st Jul 2008 20:26
Erm... Sorry if you take offence from this, but i dont see why were taking 1 away from the health and adding 2?
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 21st Jul 2008 22:54
No, that is a good point, you only need to plraddhealth=1

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Jul 2008 00:06
Perhaps he likes seeing the red flash of blood while he's getting healed?


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 22nd Jul 2008 20:02
Oh yeah.. I wanna have a red flash while i get healed lol
Deathead
18
Years of Service
User Offline
Joined: 14th Oct 2006
Location:
Posted: 23rd Jul 2008 15:53
Quote: "Perhaps he likes seeing the red flash of blood while he's getting healed?
"

Makes it more realistic.


Login to post a reply

Server time is: 2024-11-24 12:06:52
Your offset time is: 2024-11-24 12:06:52