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 / Write to file script (need help)

Author
Message
Billwaa
18
Years of Service
User Offline
Joined: 30th Apr 2006
Location:
Posted: 30th May 2006 23:36
I just need a script that let you add 1 to a text file, or ini file or whatever file or registery, every time you kill someone.


possible?


Add Your Games! E-mail for Details!
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 30th May 2006 23:49
I don't think FPSC Scripts let you affect external stuff such as a .txt sorry,

Tom

Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 3rd Jun 2006 01:13
The better question is why

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 3rd Jun 2006 07:45
To get a save/Load function that keeps in mind what you have done i guess

Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 3rd Jun 2006 08:11
But this could be used for more then that... people should request help with scripts instead of commands. If you want an enemy death counter that is perfectally doable, you just cant write it. If you want to show it after the level is over or before you can do that also... you just can't write it.

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 3rd Jun 2006 08:38
Hmmm,

Good points.i think this needs FPS-Source edit.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 3rd Jun 2006 17:03 Edited at: 3rd Jun 2006 17:06
@Merranvo

Is it possible to have a variable, or even a condition such as "QUANTITY" within a script add 1 to itself each time it runs?

Crazy Grandpa
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 3rd Jun 2006 23:40
Hmm....that's got me thinking-this could be used for something more, but I don't think it is possible to actually CHANGE an external.txt or .fpi-it can RUN an external .txt or .fpi, but I don't think it could change one. Hmmm, I will have to mess around a bit and see if I can figure anything out.

Tom

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 3rd Jun 2006 23:44 Edited at: 3rd Jun 2006 23:51
I don't think it's possible for an fpi script to increment a value (I'm talking about within itself, not an external file) but I'm not that good with fpi. If it could, an external script or program could access that fpi and the information could be useful.

Just a thought. I'm sure Merranvo knows.

Crazy Grandpa
Tom0001
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 4th Jun 2006 00:09
Yes but still, the fact remains that FPSC cannot change anything within the .fpi or .txt file, which I assume is what Billwaa wants.

Tom

Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 4th Jun 2006 00:16
:activated=1:incstate=1,activate=0


I have this in tutorials de scripting in Revial: Teh FAQ as counter or CNT... really easy to implement and does do counting (fun to count with numbers!)

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 4th Jun 2006 01:50
Just as further explanation, you need an action when the counter reaches x number, so :state=5:plraddhealth=-500 for instance, after the script has been 'activated' 5 times the plr dies.

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 4th Jun 2006 17:26 Edited at: 4th Jun 2006 17:59
Understood. Thanks Merranvo.

Yes, Tom... the more I think about it, you're right. The fpi cannot track the number or record it, even to itself. It is really just a dumb script. If/then, condition/action. The value of any given variable is decided only as the script runs, and is not even stored in memory. Actually, there are not any variables. If state were a variable as well as a condition/command, it might be used in such a way. Oh well.

Crazy Grandpa
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 4th Jun 2006 19:57
state is used as a variable, as is activated. Just not as a mathematical variable. And you set this up with multiple scripts running in chairs or tables. It can track the number, as show above, but it can not record it...

I really don't understand what the discrepancy is...

We all have our inner noob. Join the NJL, and have more fun!
I believe society is flawed; our notions on life, on child rearing, stem too far back to be of relevance in this day and time.

Login to post a reply

Server time is: 2024-11-22 15:30:28
Your offset time is: 2024-11-22 15:30:28