Forum
Stranded II Scripts Unit getting stateUnit getting state
3 replies 1
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
on:hit { 	$health = health("self"); 	if($health <= 50) { 		addstate "self", "electroshock"; 	}elseif($health <= 150) { 		addstate "self", "smoke"; 	}elseif($health <= 250) { 		addstate "self", "fire"; 	} }
note that 450 hp is very much in S2. the player's normal hit without anything in his hands does 3 damage. at least for testing purposes I'd recommend to lower it to 45 hp (and the values in the script respectively).
Edit: fixed the spelling error in the script
edited 1×, last 16.03.14 06:07:20 pm
EDIT:I needed to fix the script, but its working fine. Thanks again.
edited 1×, last 16.03.14 03:52:26 pm
1