Forum

> > Stranded II > Scripts > Why does my bridge disappear underground?
Forums overviewStranded II overview Scripts overviewLog in to reply

English Why does my bridge disappear underground?

2 replies
To the start Previous 1 Next To the start

old Why does my bridge disappear underground?

aimeewilbury
User Off Offline

Quote
I created two objects, large stone bridges that opens and closes to let boats underneath. But I need to raise them in the editor or boats cant fit under.

At first I used alterobject but they kept sinking underground (and underwater). So I tried to get the coordinates but it did the same thing and I figure I'm doing it all wrong. Suggestions anyone?

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
### Stone Bridge (Open)
id=307
name=Stone Bridge (Open)
group=building
icon=gfx\icons\icon_bridge.bmp
model=gfx\bridge_open.b3d
autofade=1000
health=20000
mat=stone
behaviour=aligntowater
col=3
script=start
	on:use {
		local $x,$y,$z;
		$x=getx("self");
		$z=getz("self");
		$y=gety("self");
		$id=create("object",308,$x,$y,$z);
		free "self";
		play "vehicle_move.wav";
		}
script=end

### Stone Bridge (Closed)
id=308
name=Stone Bridge (Closed)
group=building
icon=gfx\icons\icon_bridge.bmp
model=gfx\bridge_closed.b3d
autofade=1000
health=20000
mat=stone
behaviour=aligntowater
col=3
script=start
	on:use {
		local $x,$y,$z;
		$x=getx("self");
		$z=getz("self");
		$y=gety("self");
		$id=create("object",307,$x,$y,$z);
		free "self";
		play "vehicle_move.wav";
		}
script=end

old Re: Why does my bridge disappear underground?

Hurri04
Super User Off Offline

Quote
is it a drawbridge or something different?

if yes, then you might use s2 cmd model to change between a model for the open bridge and the model for the closed bridge. (also you might need to use the command s2 cmd scale afterwards with the parameters for the size set to 1, 1, 1 in order to retain the original size if the bridge has been scaled in the definition file).
in this case you also only need to define one object.


or is the brigde more like this where the whole brigde is lifted:
http://moba.chiemgaudata.de/typo3temp/pics/d700ab276f.jpg ?
then I think you need the command s2 cmd rpos to move the brigde in its height.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview