Forum
Stranded II Scripts Scripting Questionsyou can also use 3 different keys (l,r,u)
or even 4 different keys (l,r,u,d) to make harder combinations.
jockmo42 has written
I was wondering with the getstatevalue, how would I make it refer to only the crab I hit? I know about $local, just not quite how to apply it in this case. Any help?
It's easier if you script the crab with an on:kill event
, that way it always referes to the crab being hit.
It this case you should be able to use "self" in place of
the getstatevalue's ID requirement, as long as the
script belongs to the crab beinbg hit.
Raven Shadow has written
It's easier if you script the crab with an on:kill event
, that way it always referes to the crab being hit.
It this case you should be able to use "self" in place of
the getstatevalue's ID requirement, as long as the
script belongs to the crab beinbg hit.
jockmo42 has written
I was wondering with the getstatevalue, how would I make it refer to only the crab I hit? I know about $local, just not quite how to apply it in this case. Any help?
It's easier if you script the crab with an on:kill event
, that way it always referes to the crab being hit.
It this case you should be able to use "self" in place of
the getstatevalue's ID requirement, as long as the
script belongs to the crab beinbg hit.
I was hoping I could use self, thanks!
Bloodshot has written
Anyone? Alright: baby raptor script (page before) why dosn't s2 register the hour?
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
script=start 	[B]if ($hour==7) { 		if ($lifespan<20) { 			local $hunger; 			$hunger++; 			msg "The baby raptor's hungry!",1; 		} 	} 	if ($hour==12) { 		if ($lifespan<20) { 			local $hunger; 			$hunger++; 			msg "The baby raptor's hungry!",1; 		} 	} 	if ($hour==18) { 		if ($lifespan<20) { 			local $hunger; 			$hunger++; 			msg "The baby raptor's hungry!",1; 		} 	} [/B] 	on:changeday { 		if ($hunger>2) { 			kill "self"; 			$babyraptor=0; 		} 	$lifespan++; 	local $lifespan; 	if ($lifespan==5) { 		scale 0.13; 		$speed=1.5; 		addstate "self", "speed"; 		statevalue "self", "speed", $speed; 	} 	if ($lifespan==10) { 		scale 0.25; 		$speed=1.8; 		addstate "self", "speed"; 		statevalue "self", "speed", $speed; 	} 	if ($lifespan==16) { 		scale 0.35; 		$speed=2.1; 		addstate "self", "speed"; 		statevalue "self", "speed", $speed; 	} 	if ($lifespan==20) { 		scale 0.5; 		$speed=2.5; 		addstate "self", "speed"; 		statevalue "self", "speed", $speed; 		$eggs1=random (1,3); 		if ($eggs2==0) { 			if ($eggs1==2) { 				create "object",230,getx "self",gety "self",getz "self"; 				$motherid=currentid; 			} 		} 	} 	if ($lifespan==40) { 		kill "self"; 		$babyraptor=0; 		$motherid=0; 	} 	} 	on:use { 	if ($lifespan>20){ 		ride; 	}else{ 		if($hunger>-1) { 			if(playergotitem (9)>0) { 				$hunger--; 				freestored "unit",1,9,1; 				play "eat.wav"; 			}elseif(playergotitem (11)>1){ 				$hunger--; 				freestored "unit",1,11,2; 				play "eat.wav"; 			}else{ 				msg "I need raw meat to feed him!",3; 				speech "negative"; 			} 		} 	} 	} 	on:kill { 		event "iskill_hunt","global"; 	} 	on:create { 		timer "self",5000,0; 		local $babyraptor; 		$babyraptor=1; 		$speed=1.25; 		[B]$hour=hour;[/B] 	} 	on:start { 		timer "self",5000,0; 		local $babyraptor; 		$babyraptor=1; 		$speed=1.25; 		[B]$hour=hour;[/B] 	} 	on:timer { 		if (health("self")>0){ 			if ($ifespan<20) { 				ai_mode "self","goto","unit","1"; 				ai_center; 		} 	} script=end
edited 1×, last 05.09.08 01:56:50 am
once the necessary code is included in game.inf the
specific hotkey has to be assigned by the player, via
the game option menu on the main screen
1
if ($ifespan<20) {
EDIT:can units have a plague_target behaviour?
edited 1×, last 05.09.08 03:27:08 pm
How do I get self made animals into stranded 2?
modeling and animation already done in milkshape.
what i have to do now?
any tutorial or somthing like that out there?
but
$hour=hour();
fucking detail
and another detail, you have to assign script to event
Quote
script=start
if ($hour==7) {
if ($lifespan<20) {
if ($hour==7) {
if ($lifespan<20) {
should be
1
2
3
4
2
3
4
script=start on:some_event { if ($hour==7) { if ($lifespan<20) {
1
2
3
4
2
3
4
on:build_finish { 		event "building",0,0; 		process "building",1000; 	}
edited 1×, last 05.09.08 10:21:56 pm
I'm having trouble understanding whatever language you're speaking.
Quote
i am making a mod and i am trying to make it so that win you build a building it takes time to make it like win you are making a stuff and not the gathering part?
"win" is probably "when", that's key word of it. So now it should look like this:
Quote
i am making a mod and i am trying to make it so that when you build a building it takes time to make it like when you are making a stuff and not the gathering part?
hmm.. anyone else can continue analysis, cause I'm in dead-end
Right now more time is spent gathering the materials needed then the actual construction.
Everytime the player right clicks on a construction site,
s/he wants to add a time requirement, such as how the process command does when combining items
or eating does.
unquote
1
2
3
4
5
6
7
2
3
4
5
6
7
script=start 	on:build_finish{ 		process "building", 10000; 		//you can change the 10000 to whatever you want 		jade 40; 		//increases the hunger, thirst, and exaustion all by 40 (you can also change) 	}
1
2
3
4
5
6
7
2
3
4
5
6
7
script=start on:build_finish{ process "building", 10000; //you can change the 10000 to whatever you want jade 40; //increases the hunger, thirst, and exaustion all by 40 (you can also change) }
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
script=start on:build_finish{ process "building", 10000; //you can change the 10000 to whatever you want jade 40; //increases the hunger, thirst, and exaustion all by 40 (you can also change) } script=end
EDIT:can something have 2 behaviours?
edited 1×, last 08.09.08 12:50:03 pm
DontKnowToScript has written
can something have 2 behaviours?
Nonsence
HudaJan has written
Nonsence
DontKnowToScript has written
can something have 2 behaviours?
Nonsence
No, it isn't. You may think of a behaviour like "bird" and "raptor" both, anyway an aggressive bird. But unfortunately it isn't possible, but not nonsence.
(Damn, I often wonder why DC didn't thought about that possibility and implemented it! Maybe 'cause lack of abstract thinking here.)