Forum

> > Stranded II > Scripts > Scripting Questions
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Scripting Questions

2.429 Antworten
Seite
Zum Anfang Vorherige 1 275 76 77121 122 Nächste Zum Anfang

alt Re: Scripting Questions

galahad13
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Avenger1130
User Off Offline

Zitieren
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

alt Re: Scripting Questions

ESKARN
User Off Offline

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

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
ESKARN hat geschrieben
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;
}

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
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
1× editiert, zuletzt 24.10.09 16:30:02

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Vectarrio
User Off Offline

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

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
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

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
ESKARN hat geschrieben
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;
}

alt Re: Scripting Questions

ESKARN
User Off Offline

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

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
Vectar666 hat geschrieben


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

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Vibhor
User Off Offline

Zitieren
galahad13 hat geschrieben
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

alt Re: Scripting Questions

ESKARN
User Off Offline

Zitieren
Vectar666 hat geschrieben
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

alt Re: Scripting Questions

galahad13
User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 275 76 77121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht