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 / Possible way of having an armor meter

Author
Message
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 14th May 2007 13:20
OK, I have already proclaimed that I am by far no scripter, and my offer always stands that if I recieve a "working script" I will make a custom character(attatched to the standard FPC skeleton) for whom ever pulls it off. I have an idea of how to implement an armor stat but since i have no scripting skills, I cant accually execute the action. It would basicly work on multiple scripts. Here are the details and let's see if it can be done.
*1.you ould use the health stat as the armor(this way if you loose all your armor you die)
*2.you would have to make the visible "health" stat, be something else
*3.You have 10 pics for armor values and 1 pics for health. when you lose half your "armor" you recieve a hit on your "health"
*4.you can have a script running that give you 10% of your armor stat back every so many seconds.
*5. unfortunately useing this method will make health items give you armor instead of health.

Is this possible at all. I wouldn't even know in the slightest where to begin. As I said, if this can be made possible then I will make a custom character animated with the FPSC skeleton for whom ever gets this working.


Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 14th May 2007 13:49
I'll do it for you... when the latest source code for FPSC comes out.


[center]
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 14th May 2007 14:01 Edited at: 14th May 2007 14:02
Maybe we can work this slowly then. Can we start with a a script that is activated by a trigger zone that starts healing 10 points of health every 30 seconds for the remainder of the stage?


Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 14th May 2007 14:43
Yep.


[center]
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 14th May 2007 14:51
Veron I would love that script (the healing one) because combined with Butter's Visual Damage script it would be like G O W.
But you'd have to script something in so when you got hit it stopped healing you for 10 seconds or something .

E.D.

SamHH
17
Years of Service
User Offline
Joined: 9th Dec 2006
Location: Vermont
Posted: 14th May 2007 17:40
there was a source mod a while ago that had money and armor. and xp.
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 14th May 2007 17:46
I can't wait till they release the latest source......


E.D.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 14th May 2007 18:39
Quote: " Can we start with a a script that is activated by a trigger zone that starts healing 10 points of health every 30 seconds for the remainder of the stage?"


As you know, there is only one timer. While this script can be done, if at any point during the level you encounter another script which uses the timer, the results of both scripts would be affected.

You could tie the armor images to the health stats, but they would always work together. There is no variable to use except health, so you can not add or subtract armor without doing the same to health. You can make a pickup for armor items, but you can only add amounts to the one accessible variable, health.

Until and if we get more variables, I can't think of any good way to do it.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 14th May 2007 19:24 Edited at: 14th May 2007 19:24
ack that sucks, i thought we did have more than one variable to work with, oh well that got shot down; but a healing timer would still be nice


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 14th May 2007 20:20
Quote: ";Artificial Intelligence Script

;Header

desc = add health (trigger zone)

;Triggers

:state=0,plrwithinzone=1:state=1
:state=1:timerstart,state=2
:state=2,timergreater=30000:plraddhealth=10,state=1

;End of Script"


Best.

I'm sorry, my answers are limited. You must ask the right question.

MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 14th May 2007 21:05
We need the entitytimer function from empty's mod in the next update. AND I'M TALKING NEED HERE MISTER LEE.
pretty please??

E.D.

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 14th May 2007 22:55
does the player have to be in the trigger zone for it to work, or can they leave the zone? Otherwise its just a healing station.


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 14th May 2007 23:04
Once the player enters the zone, the healing starts and continues throughout the level, per your specifications.

best.

I'm sorry, my answers are limited. You must ask the right question.

Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 14th May 2007 23:21
Once the latest edition of the source code becomes available add something like this to the main game loop. You can add whatever code you want for ratio of health and armour lost when taking damage.

rem define player health and armour variables
let h=100
let a=100
rem start loop
do
if a=>1 then let h=h : locate 0,5: print "Health:" ;h : locate 1,5: print "Armour:" ;a
if a=>50 then let h=h+1 : locate 0,5: print "Health:" ;h : locate 1,5: print "Armour:" ;a
if a=<0 then let h=h-1 : locate 0,5: print "Health:" ;h : locate 1,5: print "Armour:" ;a
until a=<0 and h=<0 then goto 10
loop
10 Rem player is dead
locate 10,10: print "you are dead"
end

There might be a generous scripter around that is prepared to write an fpi that does what you are looking for but looks like xplosys has kindly filled that position
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 14th May 2007 23:38
Quote: "I will make a custom character animated with the FPSC skeleton for whom ever gets this working."

That sounds interesting.

Two meters?

Health: **********
Armor:  **********


I could do something like that when the armor goes half way you lose one health bar like you said.


Health: *********
Armor:  *****


Script ot replenish armor is no problem.

I think this is doable. I'll give it a try soon. (I'm in the middle of moving)



Don't forget to visit Conjured Entertainment
Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 15th May 2007 10:38
If it is doable, then you win the cigar (metaphoric cigar, I would never distribute tobbacco products to anybody,lol)


tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 15th May 2007 21:01
thats completely possible. It's just the same as the health bar script people use, exept you half of the bar with armour insead.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 15th May 2007 21:10
Quote: "exept you half of the bar with armour insead."


What does that mean?

I'm sorry, my answers are limited. You must ask the right question.

tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 18th May 2007 23:47
As you can just use different huds. Instead of making 10 immages just for a life bar (see the sininsoul HUD, it has a great example of this) use 10 immages that are health and armour.

eg.


= Health
= Armour

It is perfectly possible. E-mail loc and he may be able to help you Good luck with it D13

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th May 2007 00:57
I understand how the hud displays, but what tracks the armour value, or is it tied to the health value?

best.

I'm sorry, my answers are limited. You must ask the right question.

Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 19th May 2007 01:51
explosys,
following on from tyrano man. His method would work fine, if you set all health packs to only recharge health if the player is below 100, but as there is only a way of adding health, and not of actually setting it to a value, tyranos technique is flawed.

you will always end up gaining armour if you pickup health.

I've been trying to figure a way, since I read this post a few days back, but nothing is leaping out at me as a solution...

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th May 2007 02:01
Quote: "you will always end up gaining armour if you pickup health."


Hence the question "are they tied together?"

The only usable variable I know of is health. You can add armor to the value "health", but it's still health. I guess you could make it look like both.

Until we have another var, I don't see a way either.

best.

I'm sorry, my answers are limited. You must ask the right question.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 20th May 2007 08:26 Edited at: 20th May 2007 08:34
Quote: "The only usable variable I know of is health."

Quote: "Until we have another var, I don't see a way either."


Think about this Xplosys...

The newest versions of FPSC give us the ability to move entities to targets.

What does that have to do with variables?

Well, we can create an Abacus now with scripts.


                                                 

Don't forget to visit Conjured Entertainment
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th May 2007 15:33 Edited at: 20th May 2007 16:57
Quote: "Well, we can create an Abacus now with scripts.
"


Yes, interesting. Still, how do you record and manipulate the value of the abacus? Even with a visual representation (abacus, stack of entities, hud image, whatever) how do you add and subtract to the value of "armor" and how does it affect "health"?

Just to use your example, lets say we move 3 entities to the right side of the abacus. How does the engine know the meaning of that? right_entities=3? How do we tell the engine that, when three entities are over here, armor is 3 higher and health degrades at a slower rate.

I keep coming back to variables.

Best.

I'm sorry, my answers are limited. You must ask the right question.

tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 20th May 2007 15:52
Oh right i didn't read the part about the health packs. Didn't realise that. My bad

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd May 2007 05:59
Quote: "How does the engine know the meaning of that? right_entities=3? "

"Easy, I've looked into for myself"...Kip

Think about it...
with an anywithin the incrementor adds or the decrementor subtracts by moving the script to a different state
The state represents the value and can act accordingly.
The idea being that each incrementor or decrementor acts for each digit with ten states representing 0 - 9
The 3 in your example would be 1000 combinations by carrying 3 digits (000 to 999)
We would need six objects- 3inc / 3dec for that example.
These would control a value up to one thousand.
However, if we knock it down to two digits (00-99) we have 100 which would only need 4 objects (2inc/2dec)
SO, 4 objects could keep track of anythings (health, armor, gold, reagents, etc)
We would need objects (beads) to throw back and forth (movetotarget) too.

Does any of this make sense?

Don't forget to visit Conjured Entertainment
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 22nd May 2007 06:08
Quote: "with an anywithin the incrementor adds or the decrementor subtracts by moving the script to a different state"


But doesn't anywithin take a 0 or 1 value? If anywithin is 1 (true), what happens when you move another entity to the zone. Isn't it still equal to 1?

Increments can only be done with a variable, not a boolean.

Either that, or I still don't get it. lol

Best

I'm sorry, my answers are limited. You must ask the right question.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd May 2007 06:17 Edited at: 22nd May 2007 06:58
Quote: "But doesn't anywithin take a 0 or 1 value? "

Yeah, and each state can have one.
True (1) = go to the next state (which 'hides' the last number and 'shows' the next one)
The Inc and Dec have to be tied together (ifused) to stay in synche.
Activated states would adjust opposite **crementors.

Edit
After I finish moving, I plan to work on this full time.
I've been dreaming and scheming this thing in my head way before we could move to targets.
I need this for my FPSRPG. I may even drop out of school for a quarter. (to play with FPSC-X10)
This move should result in a faster conection and new puter for X10.
I'm going to get jiggy with FPSC very soon.
~ ~ MWUHAHAHAHAHA
-           -           -           -           -      

Second Edit
I had another idea.
By determining the distance away, one object could determine all the digits.
The placement objects would be inline with the determiner at the end.
This way one one object would be scripted. The placement objects could use default.fpi.
This way may be better. I know this all sounds crazy, but I have to find this workaround.

Don't forget to visit Conjured Entertainment
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 22nd May 2007 16:10
Ok, way over my head but very interesting. I've tried to think your process through, but to no avail. I'm one of those people who can't get from A to D without B and C.

Best of luck with it and I hope you'll keep us up with the progress.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Foxhound7
18
Years of Service
User Offline
Joined: 19th May 2006
Location:
Posted: 23rd May 2007 02:08
what if you used the variable for lives? Can you rig it so the player loses a "life" everytime they get hit and that could be your armor, then if lives=0 deal damage to the HP? I dunno just a thought...

Your signature has been erased by a mod

Login to post a reply

Server time is: 2024-11-23 17:57:10
Your offset time is: 2024-11-23 17:57:10