
Forum




Random Island Units
6 replies








1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
$id=randomcreate("unit",40,50,1000000); addscript "unit",$id,"sys/scripts/random_charscripts.s2s","chieftain"; $id=randomcreate("unit",38,50,1000000); addscript "unit",$id,"sys/scripts/random_charscripts.s2s","hempguy"; $id=randomcreate("unit",34,50,1000000); addscript "unit",$id,"sys/scripts/random_charscripts.s2s","native"; $id=randomcreate("unit",37,50,1000000); addscript "unit",$id,"sys/scripts/random_charscripts.s2s","pirate"; $id=randomcreate("unit",41,50,1000000); addscript "unit",$id,"sys/scripts/random_charscripts.s2s","prof";

same procedure for the sheep with that code (paste that line several times to add more sheep):
1
randomcreate "unit",11,50,1000000;
I didn't test it but it should work that way.


Thanks a lot I did what you said DC and I got all the characters on my island but I'm still having trouble adding the sheep. I tried using this code with the numbers you gave me for the sheep "$id=randomcreate("unit",11,50,1000000);", and also just "randomcreate "unit",11,50,1000000;". I kept getting a script error thinking I messed up somewhere.
11 is only the ID for some silly fish... Try 15 instead. That should work.
To set more than one sheep you can use a loop:
1
2
3
2
3
loop("count",50) { 	randomcreate "unit",15,50,1000000; }
edited 1×, last 29.03.12 05:49:09 am


loop("count",1) {
randomcreate "objects_stone",71,50,1000000;
}
edited 1×, last 30.03.12 01:21:57 am
1
randomcreate "object",71,50,1000000;
instead of
1
2
3
2
3
loop("count",1) { randomcreate "object",71,50,1000000; }
which would actually result in the same. And yes, it's "object", not "objects_stone"...

(there are "object","unit","item","info" for the different classes)



