Scripting Questions
2,429 replies Is it possible to change it so that buildings look normal when you are placing them? cuz more often than not, I have to guess where I am placing something, since the ghost image doesn't seem to show up.
oh, and if it is possible, could someone maybe demonstrate how I would do that? I have no talent whatsoever for scripting.
another question I have is, does anyone have a script that causes random crates to show up on the island? containing various random Items? I would like to set up an island that is a nexus for shipwrecks basically, and have things wash up on shore periodically from the wrecks. everything from building materials to food, weapons and gold.
thanks in advance for any help
oh, and if it is possible, could someone maybe demonstrate how I would do that? I have no talent whatsoever for scripting.
another question I have is, does anyone have a script that causes random crates to show up on the island? containing various random Items? I would like to set up an island that is a nexus for shipwrecks basically, and have things wash up on shore periodically from the wrecks. everything from building materials to food, weapons and gold.
thanks in advance for any help
I need help making my animations work, I made a headcrab model with animations and they don't work in stranded.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
### Headcrab
id=42
name=Head Crab
group=animal
icon=gfx\Headcrab.bmp
model=gfx\Headcrab.b3d
scale=3.5
behaviour=raptor
health=15
speed=2.7
turnspeed=5.0
attackrange=40
ani_move=21,40,0.05
ani_idle1=1,20,0.05
ani_die=41,45,0.05
ani_attack=46,55,0.05
damage=3
script=start
on:kill {
event "iskill_hunt","global";
}
script=end
id=42
name=Head Crab
group=animal
icon=gfx\Headcrab.bmp
model=gfx\Headcrab.b3d
scale=3.5
behaviour=raptor
health=15
speed=2.7
turnspeed=5.0
attackrange=40
ani_move=21,40,0.05
ani_idle1=1,20,0.05
ani_die=41,45,0.05
ani_attack=46,55,0.05
damage=3
script=start
on:kill {
event "iskill_hunt","global";
}
script=end
!-Proud User of blender 3d (woot)-!
www.blender.org
www.blenderartists.org
ok i am so lost on why this dosent work
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
seqevent 11,"scene1a";
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$z=getz("info",4);
explosion $x,($y+5),$z,150;
}
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$z=getz("info",4);
explosion $x,($y+5),$z,150;
}
making THE CRASH adventure
ESKARN has written:
ok i am so lost on why this dosent work
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
seqevent 11,"scene1a";
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$z=getz("info",4);
explosion $x,($y+5),$z,150;
}
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$z=getz("info",4);
explosion $x,($y+5),$z,150;
}
Try this:
Code:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
seqevent 11,"scene1a";
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
dident work i still get the same error
i also get the error when the map starts
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
script error
mishmatched brackets
script: global map script
info: performed by seqevent
event:scene1a
row 32
col 1
script }
mishmatched brackets
script: global map script
info: performed by seqevent
event:scene1a
row 32
col 1
script }
i also get the error when the map starts
Code:
1
"on" must not be suboardinated to conditions
edited 1×, last 24.10.09 04:30:02 pm
making THE CRASH adventure
ok the internal script is
and the external script is
and the error is now just the
"on" must not be suboardinated to conditions
row 13
col 12
Code:
1
2
3
4
2
3
4
on:start {
addscript 0,0,"maps\my maps\the crash part 1intro.s2s";
event "intro";
}
addscript 0,0,"maps\my maps\the crash part 1intro.s2s";
event "intro";
}
and the external script is
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
on:intro {
blur 0.85;
seqstart 1,1;
seqtimemode 1000,1;
cammode 0,1,"object",1231;
setcam 0,2;
seqfade 0,3000,0,0,0,2;
seqmsg 3,"errrrrrr.",5;
seqfade 4,7000,0,0,0,0;
seqmsg 7,"ohhhh.",5;
cammode 10,1,"object",5;
seqevent 11,"scene1a";
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
blur 0.85;
seqstart 1,1;
seqtimemode 1000,1;
cammode 0,1,"object",1231;
setcam 0,2;
seqfade 0,3000,0,0,0,2;
seqmsg 3,"errrrrrr.",5;
seqfade 4,7000,0,0,0,0;
seqmsg 7,"ohhhh.",5;
cammode 10,1,"object",5;
seqevent 11,"scene1a";
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
and the error is now just the
"on" must not be suboardinated to conditions
row 13
col 12
making THE CRASH adventure
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
on:intro {
blur 0.85;
seqstart 1,1;
seqtimemode 1000,1;
cammode 0,1,"object",1231;
setcam 0,2;
seqfade 0,3000,0,0,0,2;
seqmsg 3,"errrrrrr.",5;
seqfade 4,7000,0,0,0,0;
seqmsg 7,"ohhhh.",5;
cammode 10,1,"object",5;
seqevent 11,"scene1a";
[b]}[/b] //THIS WAS LOST
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
blur 0.85;
seqstart 1,1;
seqtimemode 1000,1;
cammode 0,1,"object",1231;
setcam 0,2;
seqfade 0,3000,0,0,0,2;
seqmsg 3,"errrrrrr.",5;
seqfade 4,7000,0,0,0,0;
seqmsg 7,"ohhhh.",5;
cammode 10,1,"object",5;
seqevent 11,"scene1a";
[b]}[/b] //THIS WAS LOST
on:scene1a {
$x=getx("info",4);
$y=gety("info",4);
$y+=5;
$z=getz("info",4);
explosion $x,$y,$z,150;
}
cool thanks it works explosion kills me but ill just have to move it and another question
is there a command to make the camera look (not move) up to an object slowly
is there a command to make the camera look (not move) up to an object slowly
making THE CRASH adventure
Yes, apply the command
setrot to cam info, then reset your camera with some command (
cameramove or
setcam)



tried that but it's too hard for the moment but i am lost again can anyone tell me why this does not work?
thanks in advance
Code:
1
2
3
4
5
2
3
4
5
on:scene1 {
ai_stay "unit",112,1;
ai_stay "unit",110,1;
}
ai_stay "unit",112,1;
ai_stay "unit",110,1;
}
thanks in advance
making THE CRASH adventure
ESKARN has written:
tried that but it's too hard for the moment but i am lost again can anyone tell me why this does not work?
thanks in advance
Code:
1
2
3
4
5
2
3
4
5
on:scene1 {
ai_stay "unit",112,1;
ai_stay "unit",110,1;
}
ai_stay "unit",112,1;
ai_stay "unit",110,1;
}
thanks in advance
AI commands does not need "unit" option. AI works only on units!
Code:
1
2
3
4
5
2
3
4
5
on:scene1 {
ai_stay 112,1;
ai_stay 110,1;
}
ai_stay 112,1;
ai_stay 110,1;
}
ok thanks that worked my maps looking pretty good now but is there a way to make a lion attack another unit
making THE CRASH adventure
Vectar666 has written:
yea i thought that might be the command to use but how would i use it
say i wanted a lion (id 6) to attack a villager (id 7) how would i do that
making THE CRASH adventure
ai_mode ID1,"hunt","unit",ID2;
or
ai_mode ID1,"attack","unit",ID2;
where ID1 is lion's id, and ID2 is the villager's id
or
ai_mode ID1,"attack","unit",ID2;
where ID1 is lion's id, and ID2 is the villager's id
galahad13 has written:
Is it possible to change it so that buildings look normal when you are placing them? cuz more often than not, I have to guess where I am placing something, since the ghost image doesn't seem to show up.
oh, and if it is possible, could someone maybe demonstrate how I would do that? I have no talent whatsoever for scripting.
another question I have is, does anyone have a script that causes random crates to show up on the island? containing various random Items? I would like to set up an island that is a nexus for shipwrecks basically, and have things wash up on shore periodically from the wrecks. everything from building materials to food, weapons and gold.
thanks in advance for any help
oh, and if it is possible, could someone maybe demonstrate how I would do that? I have no talent whatsoever for scripting.
another question I have is, does anyone have a script that causes random crates to show up on the island? containing various random Items? I would like to set up an island that is a nexus for shipwrecks basically, and have things wash up on shore periodically from the wrecks. everything from building materials to food, weapons and gold.
thanks in advance for any help
can someone answer his question too?
as i know how it feels to be ignored
My avatar describes my personality the best....Douchebag who have to save the princess without speaking anything
Vectar666 has written:
ai_mode ID1,"hunt","unit",ID2;
or
ai_mode ID1,"attack","unit",ID2;
where ID1 is lion's id, and ID2 is the villager's id
or
ai_mode ID1,"attack","unit",ID2;
where ID1 is lion's id, and ID2 is the villager's id
ok tried those the attack one comes up with the error
Code:
1
attack is not a valid AI mode
and hunt does nothing
tried both with
Code:
1
on:load
and using a timed trigger
Code:
1
on:trigger
making THE CRASH adventure