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 / Armour conditions?

Author
Message
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 10th Oct 2013 21:14
I could only find 1 condition and it is "armouron=x".
Is there anything like "armourless=x" or "armourgreater=x"?

Don't waste your life
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 10th Oct 2013 22:17
Hi A dude
Yes, look into "arminc" and "armdec" in the Syntax list.
best
Scene Commander
Support Manager
15
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 11th Oct 2013 11:15 Edited at: 11th Oct 2013 11:20
Hi,

There are no armour lesser or greater conditions, but you can use the variable shortcut $ARM to assign the current armour value to a named varible. Comparisons can then be made to that variable.

The arminc and armdec only add and subtract to the armour value.

I hope that helps,

SC

Bringing you games since 1981!
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 13th Oct 2013 02:16
Can you provide an example?

Don't waste your life
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 14th Oct 2013 00:07
Thank you for the clarification Scene Commander. As I don't/haven't
used $ARM. (if I understand correctly) one would/could set "$ARM" (setvar=$ARM 100) once in a level, and then add or subtract from that with your scripts?
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 15th Oct 2013 23:16
I don't get it.

Don't waste your life
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 16th Oct 2013 10:08 Edited at: 16th Oct 2013 10:33
:state=0:armon=1,setvar=$ARM 100,state=1
:state=1,vargreater=$ARM 50:state=2
:state=1,varless=$ARM 50:state=3


This will turn on armour and set armour to 100. Then if armour is greater than 50 it will send you to state 2. If armour is less than 50 it send you to state 3.

I think thats how its suppose to work anyways :/

Youtube, Twitter, Instagram: Teabone3
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 17th Oct 2013 21:13
Thanks. I think I get it now.

Don't waste your life
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 22nd Oct 2013 01:58
Let us know if it works out for you? I had some issues with it myself.

(Teabone)
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 22nd Oct 2013 21:36 Edited at: 22nd Oct 2013 21:53
Okay.

Edit: It works pretty well.

Don't waste your life
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 22nd Oct 2013 23:08
I tried making a recharging shield system but it doesn't work. I'm sure the script is totally wrong.



Don't waste your life
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 23rd Oct 2013 01:46
It appears to be okay but I'll have to check when I get home.

In the line

:state=0,vargreater=99:arminc=0

what are you expecting it to do?

(Teabone)
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 23rd Oct 2013 21:00
I don't want the armor to increase the it's above 100.

Don't waste your life
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 24th Oct 2013 21:55
Any help?

Don't waste your life
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 25th Oct 2013 23:30
No one?

Don't waste your life
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 26th Oct 2013 01:08
I don't think you would use arminc=0.

(Teabone)
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 27th Oct 2013 13:52
Have you tried the script?

Don't waste your life
Teabone
Valued Member
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 30th Oct 2013 06:18
Are you using it in a trigger zone or on an entity?

(Teabone)
Scene Commander
Support Manager
15
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 30th Oct 2013 13:24
Hi,

Attach this script in the main script to a entity set to always active. I'd suggest a crate or something that fits well in your level.



This took a little playing around with due to some issues in the official with loading numeric huds, if either myself or S4 get a chance we may look at it, but as there's a workaround, it's not 100% urgent, and I'm afraid my time is rather full at the moment.

There are several issues with your code, which I'm afraid I don't have time to go into. If I do later, I'll try and explain.

I hope this helps and works for you.

SC

Bringing you games since 1981!
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 30th Oct 2013 19:59 Edited at: 30th Oct 2013 20:09
It works. Thanks a bunch!

Edit: I looked at the script and found "hudtype=6" was type of hud is it?

Don't waste your life
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 7th Nov 2013 20:28
@ Scene commander,

IF you have time can you explain the script a bit please?

Don't waste your life
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 7th Nov 2013 22:28
Quote: "Edit: I looked at the script and found "hudtype=6" was type of hud is it?
"


Quote: "can you explain the script a bit please?"


If you look in the Official Community Guide (the first one), go to page 34-39. The section "Tutorial#4:- Custom Game Hud" by Plystire explains it very well.

Scene Commander's script is creating a numeric hud. Since the "hudtype=1 --> hudtype=5" is already spoken for (in the setuplevel.fpi" script (which is global), he set the hudtype to the next available number, which is 6. Had he set it to 1-5, it would conflict with previous defined hudtypes.

As far as the rest of the script, it is fairly easy to follow. He defines the hud for armour, sets a variable for armour, and has that info displayed when armour is called (turned on). He also sets a variable to pull the value of $ARM, then compares $ARM to the armourvalue value.

Yes, the variable system at work.


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-04-19 15:32:38
Your offset time is: 2024-04-19 15:32:38