Thanks again, maybe you should create some hot link and receive money
Forum
Stranded II Scripts Scripting QuestionsThanks again, maybe you should create some hot link and receive money
2.How do i set arcade mode on a map? ( not sure if this is scripting xD)
2. See infos in the editor. It's somwhere down and it is called "Arcade mod"
Guest has written
hey how do i make new skills
hey and how do i make units stay in their place like in last mission i adventure at village like the cheiftain
1
2
3
4
5
2
3
4
5
on:collect { local $collects $collects=++; msg " Until now, you collected $collects of this type"; }
edited 1×, last 18.08.08 10:03:36 pm
Guest has written
hey and how do i make units stay in their place like in last mission i adventure at village like the cheiftain
on:start {
ai_stay "self",1;
}
LenZ:
If you want learn scripting, you should make it different way. thi put for example this code to ANY object
on:use {
$uses++;
msg "I've used this object for $uses times";
}
And if you really want to know count of collected item, try this:
Put some info (flag for example) to game and remember ID, we say 2 (global scripts)
on:start {
def_extend "item",Typ,2; //type is id of item. e.g. crystal has 1, branch 24 atd. see items.inf
}
and to our flag:
on:collect {
$collects++;
msg "I've collected $collects items of that type";
}
LenZ has written
And i got one more, i just facken started learning and i am already pissed off, what seems to be the error in this simple code?
1
2
3
4
5
2
3
4
5
on:collect { local $collects $collects=++; msg " Until now, you collected $collects of this type"; }
well every time the collect event fires, the variable
$collects is reset to zero.
Other then that, you need to tell use what it IS doing
so we have an idea of what errors you're talking
about.
jon has written
i am making a advernure mod wee you are straned on a island that used to have a farming town on it and i want to make it so that you can only plant in the farm and not any were eals.
1
2
3
4
5
6
7
2
3
4
5
6
7
script=start 	on:useground { 		if (inrange "unit", 1 [,this depends on how big the farm is- use fence pieces and tell me the dimensions] [,"object", put a small object in the center of ur farm- then put it's id here]=0) { 		skipevent; 		} 	} script=end
HudaJan has written
on:start {
ai_stay "self",1;
}
LenZ:
If you want learn scripting, you should make it different way. thi put for example this code to ANY object
on:use {
$uses++;
msg "I've used this object for $uses times";
}
And if you really want to know count of collected item, try this:
Put some info (flag for example) to game and remember ID, we say 2 (global scripts)
on:start {
def_extend "item",Typ,2; //type is id of item. e.g. crystal has 1, branch 24 atd. see items.inf
}
and to our flag:
on:collect {
$collects++;
msg "I've collected $collects items of that type";
}
Guest has written
hey and how do i make units stay in their place like in last mission i adventure at village like the cheiftain
on:start {
ai_stay "self",1;
}
LenZ:
If you want learn scripting, you should make it different way. thi put for example this code to ANY object
on:use {
$uses++;
msg "I've used this object for $uses times";
}
And if you really want to know count of collected item, try this:
Put some info (flag for example) to game and remember ID, we say 2 (global scripts)
on:start {
def_extend "item",Typ,2; //type is id of item. e.g. crystal has 1, branch 24 atd. see items.inf
}
and to our flag:
on:collect {
$collects++;
msg "I've collected $collects items of that type";
}
and how do i make skills
p.s i got the idea of the ai to stay in his place
i registered
But if you really want, try to examine some of the actual skills. See game.inf (at the bottom of the file)
darksol has written
i no how to plant i am just not shoure how to make a plant like a grape vine i want to make a corn plant i am just wondering how to make the corn grow on the vine?
copy the grape vine text in the game files then create corn item then change the first spawn number to the corn id.
Eagle has written
Hi guys,
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:
However it doesn't seem to work. In debug mode it says:
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.
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.
me too. i can do it but i need help on creating the skill itself
darksol has written
i no how to plant i am just not shoure how to make a plant like a grape vine i want to make a corn plant i am just wondering how to make the corn grow on the vine?
To have crops requires 2 models, the plant and the fruit.
Take a look at how the grapevine is defined, you'll see
that is uses the spawn command.
That command tells the game to grow fruit on the plant
The format for the command is:
1
spawn = item ID [, Growing Number of days] [, X-radius] [, Z-radius] [, Y offset] [max amount] [, number per group]
item ID is the ID used to define the fruit in the
item_xxx.inf file.
X-radius and Z-radius determines how out from the
center point of the plant's model the fruit will grow from.
max amount tells the game the maximum amount
of friut that should be on the plant before it waits for
you to pick it.
number per group controls how many fruit you get
when you pick 1. For example, when you pick 1 grape
from the vine, 10 will be put in your inventory.
edited 1×, last 20.08.08 10:15:37 pm
p.s. i want mushrooms will be plantable too