Forum

> > Stranded II > Scripts > Vitamins
Forums overviewStranded II overview Scripts overviewLog in to reply

English Vitamins

6 replies
To the start Previous 1 Next To the start

old Vitamins

Snail
User Off Offline

Quote
It could be similar to that of alcohol (alc) to establish the level of vitamins? (to my mod)
edited 1×, last 12.09.12 01:51:48 pm

old Re: Vitamins

Snail
User Off Offline

Quote
If the level of alcohol 200 induces vomiting. And I would to do that if the level of vitamin 0 so that to player could hit. (excude my english )

old Re: Vitamins

Johnfaber
User Off Offline

Quote
I like the idea of vitamins, however they should not affect health the "regular" way. Instead, let's say, low levels of vitamins decrease health regeneration and increase damage taken from wounds, poisoning, and also increase risk of diseases. Which may be another project. Diseases shouldn't hurt the player directly, either. But they might cause blurry sight, decreased skills and walking speed.
You know, one idea leads to another leads to another...

old Re: Vitamins

Snail
User Off Offline

Quote
Yes! But, I do not know how to create "vitamins script" to started it.

old Re: Vitamins

Stranded_Guy2910
User Off Offline

Quote
If I understood right you want the player to start vomiting if he drinks too much alchool and the vitamin should make him stop vomiting right?

Add this script to the achool stuff:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
on:eat {
	   process "drinking",'time for drinking in mileseconds';
	   consume 'health','hunger','thirst','exaustion';
	   $alchool+='value you want for alchool increasing';
	   if ($alchool>=200) {
				      timer "unit",1,'time between vomits in milleseconds',1,"vomit";
				     }
}
on:vomit {
		process "vomiting",'time for vomiting in mileseconds';
		consume 'health','hunger','thirst','exaustion';
		play "vomit.wav";
		vomit 1;
		if ($alchool>=200) {
				      timer "unit",1,'time between vomits in milleseconds',1,"vomit";
					}else{
				      freetimers "unit",1,"vomit";
		}
}

Add this script for the vitamin:
1
2
3
4
5
on:eat {
	   process "Eating vitamin",'time required for eating vitamin';
	   $alchool-='quantity of alchool reduced';
	   freetimers "unit",1,"vomit";
}

Hope it works fine, if not (or if this is not what you wanted) contact me, I'll be glad to help.

old Re: Vitamins

Snail
User Off Offline

Quote
user Stranded_Guy2910 has written
If I understood right you want the player to start vomiting if he drinks too much alchool and the vitamin should make him stop vomiting right?

Add this script to the achool stuff:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
on:eat {
	   process "drinking",'time for drinking in mileseconds';
	   consume 'health','hunger','thirst','exaustion';
	   $alchool+='value you want for alchool increasing';
	   if ($alchool>=200) {
				      timer "unit",1,'time between vomits in milleseconds',1,"vomit";
				     }
}
on:vomit {
		process "vomiting",'time for vomiting in mileseconds';
		consume 'health','hunger','thirst','exaustion';
		play "vomit.wav";
		vomit 1;
		if ($alchool>=200) {
				      timer "unit",1,'time between vomits in milleseconds',1,"vomit";
					}else{
				      freetimers "unit",1,"vomit";
		}
}

Add this script for the vitamin:
1
2
3
4
5
on:eat {
	   process "Eating vitamin",'time required for eating vitamin';
	   $alchool-='quantity of alchool reduced';
	   freetimers "unit",1,"vomit";
}

Hope it works fine, if not (or if this is not what you wanted) contact me, I'll be glad to help.


Thanks but it is something to do right instead of alcohol (alc) were vitamins (vit)? Thanks!
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview