Forum
Stranded II Scripts Scripting QuestionsNew question.
I am finishing my Swiss Army Knife and I want it to be able to have different uses that are changed by either:
Right clicking to select Saw or Knife etc.
OR
By using it and it changes to item 666 and become a Swiss Army Saw then using it again to become Swiss Army Scissors.
So I want it to be like this in gameplay:
Collect SAK.
Wield SAK Message "I need to have a tool out!"
Use SAK. Process, "Withdrawing Saw"
Attack with Saw = high chance of getting a bracnh
Use SAK. Process "Withdrawing Knife"
Attack with Knife = high chance of getting leaves.
....
Eventaually you use it for the Xth time and you get back to step one- a closed SAK.
Either way I am stuck, and I really need help.
Thanks,
Gregg.
I actually got the Areal triggers working before looking back to the replies here. But now I have another fun question, lol.
Is there a way to trigger marks on the map to happen sequentially?
i.e: As you go to the first X on the map, it then triggers a second X on the map to show up. Then you go to the second X and it triggers the third X, and so on.
I've got a map with all the X's on it where I want them, but I would prefer not to "give away" the location of each destination until a certain event (ie: finding the first crate) has been triggered. If that makes sense....
You guys rock!
Edit: I've figured out how to use a sign to trigger a diary entry now too - but how do I stop that script? I know "stoptrigger self" worked for the triggered script, but what is the command to stop an object-triggered script?
Sorry if I'm being annoying with too many questions. I really do appreciate the help!
edited 1×, last 12.06.08 01:32:50 am
I'm not exactly sure how to stop it from writing twice. You could have a small trigger near the sign and do it the same way you have the other triggers.
I'm too lazy to figure out the exact code for it, but that's the general idea.
I need a bit of help. I am new to the idea of scripting and don't quite understand what is going on. I am trying to put a cooking skill into the game, but I am having trouble with setting up a certain script. I am trying to set it up so you can only cook cookies with a certain cooking skill with little luck
This is the script I have below:
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
script=start 	//Bake! 	on:use { 		if (skillvalue("cooking")>=450){ 		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){ 			fry; 			process "baking",1000; 			alteritem 1,66,10; 				event "iskill_cooking","global"; 		}else{ 			msg "I need fire to bake this!",3; 			speech "negative"; 		} 	} 	}else{ 	speech "negative"; 	msg "I cannot do this yet!",3; 	msg "My cooking skill needs to be higher!",3; 	} 	//Eat 	on:eat { 		process "eating",1000; 		eat 7,50,5,0;	 	} script=end
However it doesn't seem to work. In debug mode it says:
1
2
3
4
5
6
7
2
3
4
5
6
7
SCRIPT ERROR: "else" or "elseif" without matching "if" Script: Item 4454 (Chocolate Dough type 115 ) Event: use Row: 14 Col: 6 Script: }else{
Would someone be able to correct what I have done wrong and post the correct script for me. I would be grateful for all your help.
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
script=start 	//Bake! 	on:use { 		if (skillvalue("cooking")>=450){ 			if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){ 				fry; 				process "baking",1000; 				alteritem 1,66,10; 				event "iskill_cooking","global"; 			}else{ 				msg "I need fire to bake this!",3; 				speech "negative"; 			} 		}else{ 			speech "negative"; 			msg "I cannot do this yet!",3; 			msg "My cooking skill needs to be higher!",3; 		} 	} 	//Eat 	on:eat { 		process "eating",1000; 		eat 7,50,5,0; 	} script=end
edited 1×, last 12.06.08 03:06:53 pm
Thank you very much.
the spawn=Item-Typ [,Wachsdauer in Tagen][,X-Radius][,Y-Radius][,Y-Offset][,Objekte][,Anzahl je Objekt] parameter.
could someone please explain the parameters it takes?
Anyway, try running it through Google Translator instead of Babblefish.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
on:attack2{ 		$sakcur+=1; 		if($sakcur>=3){ 			$sakcur=0; 		} 	} 	on:attack1{ 		if($sakcur==0){ 			msg "I'm closed!"; 		} 		elseif($sakcur==1){ 			msg "I'm a Knife!"; 		} 		elseif($sakcur==2){ 			msg "I'm a saw!"; 		} 	}
edited 1×, last 13.06.08 07:05:54 am
Quote
Babelfish is real slaughtering the translation for
the spawn=Item-Typ [,Wachsdauer in Tagen][,X-Radius][,Y-Radius][,Y-Offset][,Objekte][,Anzahl je Objekt] parameter.
could someone please explain the parameters it takes?
the spawn=Item-Typ [,Wachsdauer in Tagen][,X-Radius][,Y-Radius][,Y-Offset][,Objekte][,Anzahl je Objekt] parameter.
could someone please explain the parameters it takes?
spawn=item-type [, time to grow in days][,X-radius][,y-radius][,y-offset][,objects][,number per object]
GreyMario has written
Where in the hell are you finding that?
Anyway, try running it through Google Translator instead of Babblefish.
Anyway, try running it through Google Translator instead of Babblefish.
http://www.stranded.unrealsoftware.de/s2_mods.php?setlan=en under definitions
TheKilledDeath has written
spawn=item-type [, time to grow in days][,X-radius][,y-radius][,y-offset][,objects][,number per object]
Thank you.
could someone explain a little further?
Looking at the CaCao Palm:
X-radius(15) referes to how far out from the object
center the fruit will always grow or does it mean the fruit ca grow 0 to 15 units from the center?
Y-radius(30) some question as above.
Also, the Y-axis is altitude (from bottom to top) does
this actually refere to the Z-axis(depth, front to back
or near to far)?
Y-offset(75) is this the minimum height off the ground the friut will grow at?
Objects(3) what does this refere to?
Number Per Object(1) what does this refere to?
Thank you for your help.
edited 1×, last 14.06.08 12:18:48 pm
EDIT:
Never mind I read it wrong...
-Gregg.
P.S. Would just like to add that everyone whom helped me recieves a big thank you your all really helpful.
1
2
3
4
5
6
7
2
3
4
5
6
7
on:hit { if(playergotitem(SwissarmyKnife) { if(random(1,3)==1) { find *itemIdLeaf, random(1,2); } } }