Forum

> > Stranded II > Scripts > Change the player health
Forums overviewStranded II overview Scripts overviewLog in to reply

English Change the player health

6 replies
To the start Previous 1 Next To the start

old Change the player health

Stranded_Guy2910
User Off Offline

Quote
Can I change the defalt player health when it got an item, just like:

on:start {
      if (playergotitem("item id")==1) {
                                   "script to change the player health to 150"
}}

Is it possible?

old Re: Change the player health

DC
Admin Off Offline

Quote
we are in the Stranded II section, MeyeM. Stranded II doesn't use Lua

@question: I think it's not possible.. but I could be wrong..

old Re: Change the player health

Assassin moder
User Off Offline

Quote
It's possible
1
2
3
4
5
6
on:start {
	if (playergotitem("item id")==1) {
		maxhealth "unit",1,150;
		health "unit",1,150;
	}
}

Or something like this. I'm not sure because I didn't make any script over 6 months

old Re: Change the player health

DC
Admin Off Offline

Quote
oh.. oops. you are right! maxhealth will work. note: the last parameter is much health you want to ADD to the maximum (and not the new absolute maximum value)

old Re: Change the player health

Assassin moder
User Off Offline

Quote
Caution! This script is " on:start" change this for you needed! I write for 150 health, but it also can be any number and if you drop item I try write script:
1
2
3
4
5
6
on:drop {
      if (playergotitem("item id")==0) {
           maxhealth "unit",1,100;
           health "unit",1,100;
      }
 }
Or something like this I want start updating my mod.. again..but tomorrow
edited 1×, last 01.10.11 09:43:27 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview