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 275 76 77121 122 Next To the start

old Re: Scripting Questions

galahad13
User Off Offline

Quote
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

old Re: Scripting Questions

Avenger1130
User Off Offline

Quote
I need help making my animations work, I made a headcrab model with animations and they don't work in stranded.

1
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

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
ok i am so lost on why this dosent work

1
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;
}

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
ESKARN has written
ok i am so lost on why this dosent work

1
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;
}


Try this:
1
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;
}

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
dident work i still get the same error
1
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 }

i also get the error when the map starts
1
"on" must not be suboardinated to conditions
edited 1×, last 24.10.09 04:30:02 pm

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
ok the internal script is
1
2
3
4
on:start {
	addscript 0,0,"maps\my maps\the crash part 1intro.s2s";
	event "intro";
}

and the external script is
1
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; 
}

and the error is now just the
"on" must not be suboardinated to conditions
row 13
col 12

old Re: Scripting Questions

Vectarrio
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
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; 
}

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
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

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
tried that but it's too hard for the moment but i am lost again can anyone tell me why this does not work?
1
2
3
4
5
on:scene1 {
	
	ai_stay "unit",112,1;
	ai_stay "unit",110,1;
}

thanks in advance

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
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?
1
2
3
4
5
on:scene1 {
	
	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!
1
2
3
4
5
on:scene1 {
	
	ai_stay 112,1;
	ai_stay 110,1;
}

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
ok thanks that worked my maps looking pretty good now but is there a way to make a lion attack another unit

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
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

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
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

old Re: Scripting Questions

Vibhor
User Off Offline

Quote
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


can someone answer his question too?
as i know how it feels to be ignored

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
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


ok tried those the attack one comes up with the error
1
attack is not a valid AI mode

and hunt does nothing


tried both with
1
on:load
and using a timed trigger
1
on:trigger

old Re: Scripting Questions

galahad13
User Off Offline

Quote
Thanks vibhor. I've been ghosting around these forums long enough to know not to expect a very quick answer.
I figure most of the people who could answer it are probably working on thier own projects, and with luck, one of them will implement what I am looking for.
To the start Previous 1 275 76 77121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview