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 / timer script with hud - stock engine

Author
Message
biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 23rd Oct 2010 15:18
do anyone know a script that shows a progressbar ?
for a hacking script or something

regards,

[href]http://tbhproductions.com[/href]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Oct 2010 21:41
I don't know of a pre-made one off the top of my head, but it shouldn't be terribly difficult to make.

Make a bunch of HUDs depicting different times along the progress bar, then use a timer (or etimer, even better) to have the progress bar HUDs swap out and show "progress".


The one and only,


biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 25th Oct 2010 14:25
Quote: "I don't know of a pre-made one off the top of my head, but it shouldn't be terribly difficult to make.

Make a bunch of HUDs depicting different times along the progress bar, then use a timer (or etimer, even better) to have the progress bar HUDs swap out and show "progress".


The one and only,"


does this work for X10?

[href]http://tbhproductions.com[/href]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Oct 2010 00:09
Well, it's just using the basics of FPI, so I don't see why it wouldn't. FPSCX10 may not have etimers, though, so you'll probably have to stick with the regular timer. Could be wrong there, haven't used FPSCX10.


The one and only,


biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 26th Oct 2010 01:02
Quote: "Well, it's just using the basics of FPI, so I don't see why it wouldn't. FPSCX10 may not have etimers, though, so you'll probably have to stick with the regular timer. Could be wrong there, haven't used FPSCX10."


oke then the second problem is I can't script in FPI(only in vb, php,html etc.). so where is some good guide so even a beginning person could understand.

[href]http://tbhproductions.com[/href]
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 26th Oct 2010 01:09
Quote: "oke then the second problem is I can't script in FPI(only in vb, php,html etc.). so where is some good guide so even a beginning person could understand.
"


If you code in VB, then FPI scripting will be easy for you. It reminds me a lot of BASIC (back before a lot of people were born here).

I've attached a ZIP with two pdf documents- AI Scripting and the FPI Scripting language. Credit to both Xplosys and Plystire for the time spent making these documents. They are a tremendous help in learning how to script. I'd also recommend taking a look at your scripts and learn how they work. For example, place a switch on a wall and a remote door. Look at the scripts for both to get an idea how they work. You can't go wrong by playing around with your scripting. Just ensure you make working copies of scripts you want to modify so you don't change the originals.

- BlackFox

RPG Mod- Create a world full of adventure

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Oct 2010 06:11
I'd also like to point out the many tutorials in the ofpscguide.pdf document that should be found in your "FPS Creator/Docs" folder.

There are many tutorials in there that I've written aimed directly at newcomers to the FPI "language". They explain in detail how scripts work and step up to more complicated scripts, as well as script interactions (such as a switch script informing a light script to turn the light on and off).


The one and only,


biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 26th Oct 2010 11:09
thanks you guys are amazing

regards,

[href]http://tbhproductions.com[/href]
biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 27th Oct 2010 03:14
@BlackFox and @Plystire

does this work ? or is this wrong, bad coded. because I don't really know some of these functions.



[href]http://tbhproductions.com[/href]
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 27th Oct 2010 04:39 Edited at: 27th Oct 2010 04:45
Good first attempt. Myself, I usually define my huds and such first. Then I define my timers, particularly if hud images are changing after so many seconds. Then I define the end of the script- either loop it back or make it end.

Off the top of my head, I would have started this like the following:



Feel free to test, try out, modify the timer amounts, etc for your usage. My goal here was to help to give you a start into the scripting side. By looking at the layout, you should see how huds are defined, then the key to activate, then the timers.

Plystire mentioned using etimer, so if that is the preferred method, then you replace the "timergreater" with "etimergreater" and replace the "timerstart" with "etimerstart". Perhaps when Plystire drops in he could remind me why "etimer" was the better method to use.

- BlackFox

RPG Mod- Create a world full of adventure
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Oct 2010 01:37 Edited at: 28th Oct 2010 01:38
Quote: "Plystire mentioned using etimer, so if that is the preferred method, then you replace the "timergreater" with "etimergreater" and replace the "timerstart" with "etimerstart". Perhaps when Plystire drops in he could remind me why "etimer" was the better method to use."


Certainly.

The "E" in "etimer" stands for "entity". It's a local timer that is only used by that particular script and can, in no possible way, interfere with other running timers. The stock "timer" is global and if more than one script were to use it at the same time, conflicts could arise. The global timer should only be used when it's pertinent to have multiple scripts accessing it at once.


Also, one thing I noticed in your script. That is a good script, but if it is to be used for hacking then you should probably wait for an activation after activating nearby doors/terminals. The doors and terminals would be best scripted to wait for activation (by the hacking script here) and upon receiving activation, re-activate the hacking script, informing it that it can continue onto showing the progress bar.
It may just be me, but to be able to hack in mid-air seems a little out of place.


Quote: "does this work ?"


Don't be afraid to try your script out for yourself. The worst that could possibly happen is FPSC crashes, but that is the way to learn. FPI scripts will never corrupt your FPSC install or anything irreversable, so it's very safe to test them out even without knowing what'll actually happen.

If it turns out that your script, in fact, does not work, then would be the time to ask us here why it isn't working. To help us help you, though, when providing a script that doesn't work, you should provide the following information at the very least:
1) What the script should be doing
2) What the script is actually doing (along with what is happening that shouldn't be happening)


Hope this helps.


The one and only,


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 28th Oct 2010 02:07 Edited at: 28th Oct 2010 02:07
Quote: "The "E" in "etimer" stands for "entity". It's a local timer that is only used by that particular script and can, in no possible way, interfere with other running timers. The stock "timer" is global and if more than one script were to use it at the same time, conflicts could arise. The global timer should only be used when it's pertinent to have multiple scripts accessing it at once."


I figured it had to do with entities. I had noticed when using the timer command it was conflicting because we had it in a couple of running scripts. Thanks for giving me the info, and I'll ensure to pass this on to others that ask about timers. I forgot that timer was global, so I'll make note of that in my notebook for future reference.

Quote: "Also, one thing I noticed in your script. That is a good script, but if it is to be used for hacking then you should probably wait for an activation after activating nearby doors/terminals. The doors and terminals would be best scripted to wait for activation (by the hacking script here) and upon receiving activation, re-activate the hacking script, informing it that it can continue onto showing the progress bar.
It may just be me, but to be able to hack in mid-air seems a little out of place."


Agreed. I was just showing the difference between the poster's script and how I would have made it. I was hoping it gives a good base point to start from. This way it can be modified or added to for the required results.

- BlackFox

RPG Mod- Create a world full of adventure
biohazardNL
15
Years of Service
User Offline
Joined: 26th Oct 2009
Location: netherlands
Posted: 28th Oct 2010 13:16
oke thanks for helping me

[href]http://tbhproductions.com[/href]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Oct 2010 01:42
Quote: "I was just showing the difference between the poster's script and how I would have made it. I was hoping it gives a good base point to start from. This way it can be modified or added to for the required results."


Fair enough. Now he has a base starting oint and an idea to aim for.


Quote: "oke thanks for helping me"


You're welcome. I hope you can achieve what you were after.


The one and only,


Login to post a reply

Server time is: 2024-11-24 16:45:29
Your offset time is: 2024-11-24 16:45:29