Is this due to the "vehicle" or did I likely screw up?
Forum
Stranded II Scripts Scripting QuestionsIs this due to the "vehicle" or did I likely screw up?
put this script into the the unit's descripting file between the lines "script=start" and "script=end":
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
on:create { 	timer "self",3000,0; } on:start { 	timer "self",3000,0; } on:timer { 	if (health("self")>0){ 		ai_mode "self","goto","unit","1"; 		ai_center; 	} 	if (count_stored("self")>0){ 		addstate "self","particles"; 	}else{ 		freestate "self","particles"; 	} }
when using this command you have to set a value between 1 (not transparent) and 0 (completely transparent). I recommend using a value of 0.75 because this makes the best effect in my opinion.
also you have to use the command on:load because when changing the value of the wateralpha it wont be saved.
so the script for this would be:
1
2
3
2
3
on:load{ 	wateralpha 0.75; }
I don't think that there is any solution to prevent this...
but there is a problem with it because it is a little bit bugged:
the text in the scripting definition says that it is possible to run this command at certain objects by using the parameters so you could write e.g.
1
alpha 0.75, "object", 1
you could write this script anywhere you like.
but this does not work because it is bugged and you therefore have to write the command into the object itself and trigger it by an event:
write this into the script which triggers that the object becomes transparent (normally into the global map script and on:load):
1
2
3
2
3
on:load { 	event "maketransparent", "global"; }
1
2
3
2
3
on:maketransparent { 	alpha 0.75; }
you have to edit the definition of every single object which is supposed to fade at another range than the standard of 500.
write this into the object's definition in its definition file:
1
autofade=500
if the object already has such a line just edit the value.
then the sequence has to start at some event, for instance on:hit of a tree.
so you have to write this into the tree (you might have to adapt this a little if you want to start the sequence at a different event):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
on:hit { 	$flag01=[ID of the first waypoint(flag)]; 	$flag02=[ID of the second waypoint]; 	$flag03=[ID of the third waypoint]; 	$flag04=[ID of the fourth waypoint]; 	$flag05=[ID of the fifth waypoint]; 	[...] 	$flag[XX]=[ID of waypoint #XX]; 	seqstart; 	setcam 0, $flag01; 	movecam 0, 2000, $flag02; 	movecam 2000, 8000, $flag03; 	setcam 8000, $flag04; 	movecam 8000, 10000, $flag05; 	seqend 11000; }
you can add more flags that the 5 I did and then repeat the line where you give the ID of the flag to the variable.
with this script the camera mode starts, then the camera moves from the first flag to the second flag within 2 seconds. next, the camera moves to the third flag within 6 seconds (difference between 2000 and 8000 = 6000 milliseconds).
then, when the camera has reached the third falg it jumps to the fourth flag, for instance to show a whole new area of the map.
then the camera moves to the fifth waypoint and stays there for one more second and then the sequence ends.
you can also try to use the command cammode e.g. to turn the camera sidewards to look at a certain object when it normally would go straight into one direction.
if you want the texture of the water to be repeated more often you have to edit the graphic whic is used as the texture.
you can find the graphic in the gfx folder, its name is "water.jpg".
what you could do is create a new image which is twice as high and twice as wide as the water.jpg and copy the water.jpg 4 times into this new picture.
but I dont know whether this really looks better...
1
freeze 1, 0;
you can either write this script into the execute-script-box in the cheat-emenu or write it into a script with a fitting event to trigger it.
what makes the player unfreeze is the 0 at the end, to freeze the player you can write a 1 instead but you either can leave this away as you did.
An enemy approaches and attacks me. As a result of his attack, I freeze to give the effect that I'm in the ground
Then, using a timer script, I "get out" of the ground. Heh weird