Forum

> > Stranded II > Scripts > Scripting Questions
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Questions

2,429 replies
Page
To the start Previous 1 296 97 98121 122 Next To the start

old Re: Scripting Questions

Skullz
User Off Offline

Quote
i have questions:
1-What's the script to make an unit to always stay in it's position without moving?
2-what's the command that makes my character get itens in the starting of the map?
3-is there a command that edits my (or other unit's) speed?

thank you if you help

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
Skullz has written
i have questions:
1-What's the script to make an unit to always stay in it's position without moving?
2-what's the command that makes my character get itens in the starting of the map?
3-is there a command that edits my (or other unit's) speed?

thank you if you help


1: Set unit "behaviour=" to "idle" or "idleturn".
2: "find XX,YY;" where XX is the item ID and YY is the quantity. For example, "find 11,3;" will give you 3 small meat.
3: Do you mean change the speed during gameplay?

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
Somoene Evil has written
Is there an event which is triggered when you swap item in hand? like every time?

on:inhand{

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
either you set a sheep next to the starting-position and use the command s2 cmd ai_signal to give the sheep a raptor-behaviour.

or you set a raptor next to the starting-position and use the command s2 cmd model to give te raptor the model of a sheep.

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
Hurri04 has written
either you set a sheep next to the starting-position and use the command s2 cmd ai_signal to give the sheep a raptor-behaviour.

or you set a raptor next to the starting-position and use the command s2 cmd model to give te raptor the model of a sheep.


Scripting Help - Commands - Model has written
The command only works for objects or items (not for units!)


Add this to the sheep
1
2
3
on:start {
	ai_mode hunt;
}

This will make the sheep attack you, but not necessarily do any damage. You might have to make a new unit type.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
Somoene Evil has written
Hurri04 has written
either you set a sheep next to the starting-position and use the command s2 cmd ai_signal to give the sheep a raptor-behaviour.

or you set a raptor next to the starting-position and use the command s2 cmd model to give te raptor the model of a sheep.


Scripting Help - Commands - Model has written
The command only works for objects or items (not for units!)

sorry, my bad.
but in the german scripting help this isnt said this clearly...

old Re: Scripting Questions

ab6100
User Off Offline

Quote
scripting trouble can some one help me its a Barrel that spawns with random goodies in it such as food or guns/ammo. i've got it to exchange but it never has anything in it
any help would be awsome:)

Spoiler >

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
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
### Barrel
id=250
name=MBarrel
group=stuff
icon=gfx\barrel.bmp
model=gfx\barrel.b3d
health=15
color=300,300,300
mat=wood
maxweight=30000000
script=start
on:start {
$tmp=random(1,5);
          if ($tmp==1);{
               $id=("item",29,10);
               store $id,"self";
               $id=("item",58,1);
               store $id,"self";
          }elseif ($tmp==2){
               $id==("item",29,10);
               store $id,"self";
          }elseif ($tmp==3){
               $id==("item",14,30);
               store $id,"self";
          }elseif ($tmp==4){
               $id==("item",27,30);
               store $id,"self";
          }elseif ($tmp==5){
               $id==("item",45,20);
               store $id,"self";
               $id==("item",46,20);
               store $id,"self";
          }
     }

on:create {
$tmp=random(1,5);
          if ($tmp==1);{
          $id=("item",29,10);
               store $id,"self";
               $id=("item",58,1);
               store $id,"self";
          }elseif ($tmp==2){
               $id==("item",29,10);
               store $id,"self";
          }elseif ($tmp==3){
               $id==("item",14,30);
               store $id,"self";
          }elseif ($tmp==4){
               $id==("item",27,30);
               store $id,"self";
          }elseif ($tmp==5){
               $id==("item",45,20);
               store $id,"self";
               $id==("item",46,20);
               store $id,"self";
          }
     }

on:use {
     exchange "self";
          addstate "self",5;
          statevalue "self",5,100;
     }
script=end;

old Re: Scripting Questions

archmage
User Off Offline

Quote
I want to start modding stranded II. So I need somewhere to get a list of commands & a basic idea of how SII scripting works.

old Re: Scripting Questions

ab6100
User Off Offline

Quote
thanks... nother qustion

in this
1
2
3
4
5
6
7
8
9
10
11
12
13
### Rock
id=63
name=Rock
group=stone
icon=gfx\rock01.bmp
model=gfx\rock01.b3d
scale=4
detailtex=1
mat=stone
health=1500
find=23,90,2
find=21,90,7
find=23,300,1,1,88
what dose this do, is it like % of getting the item ? why is it longer than the others? and what do each of the numbers mean?
find=23,300,1,1,88

thanks agan
To the start Previous 1 296 97 98121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview