armor

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

armor

Post by darksmaster923 »

how can i do armor without the inventory. or script it with a var.
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

you could do a second attribute, and have that harmed before the health is harmed.
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

that would be really cheap. just charge in with guns blazing and dont die, even if theres 7 baddies.
heres a script i worked up in like, 2 seconds. would it work, havent tested it yet

EDIT
It doesnt work :cry: lol

Code: Select all

{
	INIT		[0]
	INITARMOR	[0]

	Spawn[ ()
	{
		Console(false);
		LowLevel("Setup");
	} ]

	Setup[ ()
	{
		PawnRender(false);
		INIT = GetAttribute("playerhealth", "Player");
		INITARMOR = GetAttribute("armor", "Player");
		self.think = "Armor";
	} ]
	
	Armor[ ()
	{
		self.ThinkTime = "0.3";
		if(GetAttribute("playerhealth", "Player") < INIT);
		{
			INIT = GetAttribute("playerhealth", "Player");
			if(GetAttribute("armor", "Player") < INITARMOR);
			{
				if(GetAttribute("armor", "Player") > 0);
				{
					ModifyAttribute("armor", -17, "Player");
					ModifyAttribute("playerhealth", 11, "Player");
					INITARMOR = GetAttribute("armor", "Player");
				}
			}
		}
	} ]
}
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

no, it wont be cheap,cos,itd be like having 100 health,with,say,5o armor on top,so 150 altogether
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Well, first of all, you have a ';' after every if( ) statement. That's not supposed to be there. You should always try these things with the console on to see if there are syntax errors.

Secondly, I don't get this part:

Code: Select all

if(GetAttribute("armor", "Player") < INITARMOR)
If I understood it correctly, you set INITARMOR = 'armor' attribute. Then the 'armor' attribute isn't changed at any part, the enemies damage only the 'playerhealth' attribute, right? So INITARMOR can't be less than 'armor' because they both remain the same.



***EDIT***
Oh, and to be honest. I don't like your way of posting.
heres a script i worked up in like, 2 seconds. would it work, havent tested it yet
You post all these things without even trying them yourself :?: :roll:
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

uhhhhhhhhh.....................no...........
Herp derp.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

omg i had an idea.
wat about if you pick up armor, a pawn goes in front of you. bot shoot pawn until it dies and your not safe no more :twisted:
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

bot shoot pawn?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

ya
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

what does it mean tho?wat bot,what pawn,why does it shoot,what happens that is so amazing,im confuuuuused :cry:
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

when the player has armor, i place the pawn in front of the player, making HIMm in the way of bullets
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

Oooooooooooooooooh!i get it!

Cant you just use the armor attribute like it says in the manual,and have 1oo% protection,and if the armor is,say,50,then the damagetoarmor percent is 2%??
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

for that i need an inentory

okay, made my script, but i cant jump.
and cant crouch :(
Herp derp.
Post Reply