Forum
Stranded II Scripts Scripting Questions1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
on:start{timer "self",100; $x=getx "self"; $y=gety "self"; $z=getz "self"; } on:timer{ setat $x,$y,$z; $x++; $a++; }if ($a==10){ freetimers "self"; }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
### Meat id=9 name=Meat group=food icon=gfx\meat.bmp model=gfx\meat.b3d scale=0.15 mat=flesh weight=500 info=a juicy piece of raw meat. I can fry it, eat it as it is or take it in my hand and throw it at wild animals... behaviour=throw damage=0 speed=15 drag=1.8 rate=3000 script=start 	//Fry! 	on:use { 		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){ 			process "frying",500; 			fry; 			alteritem 1,10; 		}else{ 			msg "I need fire to fry this!",3; 			speech "negative"; 		} 	} 	//Eat 	on:eat { 		process "eating",1000; 		eat 5,20,10,0; 		 		store $id,"unit",1; 	} 	//Taming 	on:drop { 		ai_behavioursignal "eat","raptor",300; 	} 	on:ai_eat { 		local $eater,$var; 		$eater=ai_eater(); 		if (type("unit",$eater)==2){ 			$var=getlocal("unit",$eater,"tameness"); 			$var+=2; 			setlocal "unit",$eater,"tameness",$var; 			if (($var>9)&& (gotstate("unit",$eater,"tame")==0)){ 				addstate "unit",$eater,"tame"; 				corona getx("unit",$eater),getz("unit",$eater),20,255,70,100; 				msg "I tamed it!",4; 			} 		} 	} //Taming 	on:drop { 		ai_behavioursignal "eat","loin",300; 	} 	on:ai_eat { 		local $eater,$var; 		$eater=ai_eater(); 		if (type("unit",$eater)==9){ 			$var=getlocal("unit",$eater,"tameness"); 			$var+=2; 			setlocal "unit",$eater,"tameness",$var; 			if (($var>9)&& (gotstate("unit",$eater,"tame")==0)){ 				addstate "unit",$eater,"tame"; 				corona getx("unit",$eater),getz("unit",$eater),20,255,70,100; 				msg "I tamed it!",4; 			} 		} 	} script=end
i want this script to be made that the unit stays there for 30 seconds but doesnt get tamed even if it is given 1000 of it
and i also want to know how to edit the unit that will be in effect of it
I also want to know how do i make my own state like a state which increases your thirst constantly
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
id=90 name=your info's name group=stuff frame=38 ##(I don't know what there should be...) script=start ##your script here## script=end description=start ##info about this info here##(not needed) description=end
edited 5×, last 07.07.09 07:58:54 am
I mean by the script what do i use
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
id=52 name=Thirst group=stuff frame=82 script=start on:load { event "increase_thirst",global; } on:increase_thirst { timer "self",1000,0; } on:timer { consume 0,0,-1,0; } script=end
1
consume 0,-1,0,0;
More information about this script: consume
edited 2×, last 07.07.09 08:43:51 pm
I also need a script that that u cant sleep anywhere except
for beds and when slept the player gets a state
@The second
I have renamed the stats thirst as hygiene so i need help again i want it to stay infinitely and it will be removed when an action is used
1
behaviour "klass", Typ-ID;
1
if (count_inrange( "object", The ID of the bed){
1
}else{msg "I need a bed to sleep on!",3;}
I'm still wanting to get that script which moves object from info to other because I want to make a flying U.F.O in S2Ext. (because it's object)
Bloodshot's script worked, but how to set where it goes?
1
2
3
2
3
on:timer{ 	def_overide "self","sys\scripts\ufooverride.txt"; }
I did it and it just flew in small circles, lol.
edited 1×, last 10.07.09 04:57:17 am
How I can set his pitch and yaw to projectile's pitch and yaw?
Vibhor has written
Will my question never be answered?
You need the script for the hygiene to remain infinite or for "players cannot sleep except for beds"?