Forum

> > Stranded II > Scripts > I need help with scripts
Forums overviewStranded II overview Scripts overviewLog in to reply

English I need help with scripts

6 replies
To the start Previous 1 Next To the start

old I need help with scripts

Andrew890890
User Off Offline

Quote
hi im not sure in this post is in the right area but im makingt a mod and for that i need scripts
so i need to find out how to make the shovel reduce the terrain hight by 3 eachtime so it makes somthing like a trench

old Re: I need help with scripts

Hurri04
Super User Off Offline

Quote
you can use the command s2 cmd terrain for this.

unfortunately this is one of the commands which has no english description, so best use google translator and try to understand it, even if the result of the translation might not be 100% perfect.
also dont switch the command reference page to english language because there are quite a lot commands, as I have noticed, which dont show some or all parameters in the english description unlike in the german one in which they are shown.

btw: yes, this is the right place to post such questions

old Re: I need help with scripts

Andrew890890
User Off Offline

Quote
cool thanks for replying so your saying i can do this but it will be hard? ok
well thiere is another script i need how would i get the american soldiers to shoot germans

old Re: I need help with scripts

Hurri04
Super User Off Offline

Quote
no, the shovel script isn't that hard to write, just write the s2 cmd terrain command into an on:attack2 event between the lines "script=start" and "script=end" at the definition of the shovel.

having units attack each other is pretty complicated and there already have been several attempts from good scripters to write a script which could do this but as far as I know all of them weren't working more or less.

old Re: I need help with scripts

RrR2010
User Off Offline

Quote
I have a mod that I downloaded from the Internet that has the script that you want. You can modify it according to your taste.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
on:attack2 {
		$tmp1=random(1,50);
		if ($tmp1==25){
			terrain getx("self"), getz("self"), 2, -0.2;
			create "object",241,getx("self"),getz("self");
			process "Uncovering Coal Deposit",10000;
			event "iskill_mining","global";
			event "iskill_dig","global";
			find 4997;
			find 21,(random(5,10));
			jade 25;
		}else{
			terrain getx("self"), getz("self"), 2, -0.1;
			jade 25;
			process "Lowering Land",10000;
			speech "positive";
			event "iskill_dig","global";
			find 4997;
			find 21,(random(5,10));
		}
	}

Note: The ID 241 corresponds to a rare item mod. You can put another object in place of this.
     The ID 4997 is an item that represents a lot of land that was taken from the ground.

Good Luck

old Re: I need help with scripts

Vectarrio
User Off Offline

Quote
user RrR2010 has written
I have a mod that I downloaded from the Internet that has the script that you want. You can modify it according to your taste.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
on:attack2 {
		$tmp1=random(1,50);
		if ($tmp1==25){
			terrain getx("self"), getz("self"), 2, -0.2;
			create "object",241,getx("self"),getz("self");
			process "Uncovering Coal Deposit",10000;
			event "iskill_mining","global";
			event "iskill_dig","global";
			find 4997;
			find 21,(random(5,10));
			jade 25;
		}else{
			terrain getx("self"), getz("self"), 2, -0.1;
			jade 25;
			process "Lowering Land",10000;
			speech "positive";
			event "iskill_dig","global";
			find 4997;
			find 21,(random(5,10));
		}
	}

Note: The ID 241 corresponds to a rare item mod. You can put another object in place of this.
     The ID 4997 is an item that represents a lot of land that was taken from the ground.

Good Luck

That script is from Massive Mod, isn't it?
and don't forget, in the original stranded you don't have "mining" skill.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview