Forum

> > Stranded II > Scripts > Change the player health
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Change the player health

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Change the player health

Stranded_Guy2910
User Off Offline

Zitieren
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?

alt Re: Change the player health

DC
Admin Off Offline

Zitieren
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..

alt Re: Change the player health

Assassin moder
User Off Offline

Zitieren
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

alt Re: Change the player health

DC
Admin Off Offline

Zitieren
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)

alt Re: Change the player health

Assassin moder
User Off Offline

Zitieren
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
1× editiert, zuletzt 01.10.11 09:43:27
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht