Like in Adventure, the Pirate 'briskly' marks the map. A bit like that.
Forum
Stranded II Scripts Scripting QuestionsLike in Adventure, the Pirate 'briskly' marks the map. A bit like that.
1
2
3
2
3
script=start showindicator [ID of indicator]; script=end
if you have multiple indicators that all shall appear at the same time just repeat the showindicator -command.
actually all of this is VERY easy.
Hurri04 has written
well, just make that button link to another site where the dialogue goes on for a bit and write this before the line "text=start":
by this the place of the indicator appears on the map.
if you have multiple indicators that all shall appear at the same time just repeat the showindicator -command.
actually all of this is VERY easy.
1
2
3
2
3
script=start showindicator [ID of indicator]; script=end
if you have multiple indicators that all shall appear at the same time just repeat the showindicator -command.
actually all of this is VERY easy.
Dude, are you God?
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
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
page=start title=Pirate Leader text=start Yar! I be the great pirate leader? What do ye want? text=end button=recall,Not so great for a ship crash leader! button=action:close,As if! page=recall title=Ship Crash text=start Well.... Ye see, the mighty god of sea let a storm, and we accidently crash! What else do ye want? text=end button=info,Can we be friends? button=action:close,Nothing! Bye! page=info title=Friends? script=start 	showindicator 14; 	starttrigger 18; 	stoptrigger 16; script=end text=start Weellll.... I s'pose so... Let me mark ye map for yar! text=end button=action:close,Thank you!
Also, this is ID 18 for the Starttrigger below
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
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
page=start title=Pirate Leader Jack text=start Arrr! It be you! What can I do for ye? text=end button=info,Let's talk button=action:close,Sorry! I have to go! page=info title=Chat text=start Arr! Ye olde conversation! Let me start off. Do you want to hear a story or buy a map? button=story,Story please! button=trade,Buy a map. page=trade title=Buy a Map ## Gold bag -> Map trade=start sell=5,5 buy=73,1 trade=end button=info,Let's talk again button=action:close,I must go now! page=story title=Story text=start Arr! Well I was walkin' along an olde dusty path and then suddenly a Monkey came out to try and kill me! It had sharp claws... I was honestly scared ye know! As he came towards me I pulled out my flintock walkin' backwards until I slipped over, and it nearly devoured my foot! Instead, it devoured my leg. text=end button=information,Ouch! How are you now? button=action:close,Ow! But I must get going now. Thanks! page=information title=Recovery text=start Arrhah-hah! I'se all right now! Well, I have something to do! See you later! text=end button=action:close,See you then!
Dr Zhark has written
What's wrong with this?
see, I could ask you the same question.
so what's wrong with the script?
if you want some help you should tell us something about the problem you have with it.
what does happen?
does something happen at all?
is there an error message?
if yes, what does it say?
so as I have no information of that now my first guess would be that you wrote any of these scripts into a wrong script-box.
and as you said that the second script is written into a trigger that is, as I read in the script, being activated I'd wildly guess that this is an areal trigger so you want the second dialogue to appear when entering the area of that trigger, right?
but in order to do this you have to write this script into the areal trigger and then write the second script you postet into a textcontainer:
1
2
3
2
3
on:trigger { 	dialogue "start", [ID of textcontainer]; }
it's the same with the first dialogue, you just have to write "on:use" instead of "on:trigger" into the first line and a different ID at the dialogue command of course. this then goes into the pirate's scriptbox and the first script you postet goes into a textcontainer as well.
If you need more information, state! Also,
what does happen?-Dialogue 18 (script 2) never shows
does something happen at all?-He only speaks Script 1
is there an error message?-No
Finally, there are a few other Pirates in the radius of 500.
Quote
Type: (Picture of Pirate)
well, I think this could be the problem because the trigger is just triggered when the number of pirates within the radius is smaller or equal 1 so if there are "a few other Pirates in the radius of 500" this wont be triggered.
I think this either has to be changed in a way that it is triggered when the number of pirates is bigger/equal 1
or in a way that it is triggered when the number of players is equal 1 (when the player enters the areal).
also @Qrchack:
no one needs to put any code into spoilers. this is the scripting questions thread, just in case you didnt notice, and that means that the scripts which are written in here are meant to be read.
I think the problem could be that the trigger is activated while you still are in the dialogue but as the trigger would start a new dialogue and there cant be 2 dialogues at the same time it just doesnt open.
try to write a global timer which will start the trigger after 0.001 second (1 millisecond) instead of that it is started right in the dialogue:
1
timer 0, 1, 1, "starttrigger";
1
2
3
2
3
on:starttrigger { 	starttrigger 18; }
by this the trigger which opens the second dialogue starts with a little delay ater you have closed the first dialogue.
I've been trying to develop a type of plant that sticks to your feet like glue... and the main problem I'm having, is the problem of the player's speed.
I want the player to slow down when hes walking over the plants, and then to return to normal speed after walking past them...
I've tried dozens of different ways, but it never seems to work right.
Anybody got a working script?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
on:start { 	timer "self", 1000, 0, "plant_inrange"; } on:plant_inrange { 	if(inrange("self", [RADIUS])==1) { 		if($speedlowered==0) { 			player_speed [LOW VALUE]; 			$speedlowered=1; 		}else{ 			player_speed [NORMAL VALUE]; 			$speedlowered=0; 		} 	} }
so when walking near to this plant the speed you are moving with is drained for as long as you keep standing near it.
how do i make the weapon a bit higher? and how do i make it i cant pick the weapon up (seeing that it is an item)
and also, how do i make it if i hit something, it will light on fire AND give light with the radius of 100?
edited 1×, last 10.01.11 02:23:29 am
Script works very well!
to put the weapon a little bit higher I guess you could just move it a little bit upwards within the model itself.
I'm not sure about this because I didnt read the code that much in detail because it is a mess the way you posted it (no tabs and therefore no different levels within the script script and such) but I think that it has something to do with this:
1
$y+=20;
and to be unable to pick the item up you can use a script like this:
1
2
3
2
3
on:collect { 	skipevent; }
and to light something on fire you can use this as the definitionscript of the weapon:
1
2
3
2
3
on:impact { 	addstate "impact_class()", impact_id(), 4; }
but in case that isnt you can also just use the command addstate to add either the state 22 (flare) or 24 (light) to it and resize it with the command statesize.
EDIT= got it working!
how do i make this shoot at enemies really fast and the projectile is a bullet?
### Turret
id=4590
name=Turret
group=building
icon=gfx\defensetower.bmp
model=gfx\Chaingun\chaingun.b3d
scale=1.2
y=2
health=3000
mat=wood
state=0,28,0
script=start
on:start {
timer "self",3000,0;
addstate "self",22;
statesize "self",22,15;
}
on:create {
timer "self",3000,0;
addstate "self",22;
statesize "self",22,15;
}
on:build_finish {
event "defensetowerbuild",0,0;
}
on:use {
msgbox "Defense Tower","sys/scripts/defensetower.s2s";
}
on:timer {
local $x,$y,$z;
$x=getx("self");
$y=gety("self");
$z=getz("self");
$y+=28;
projectile 29,$x,$y,$z,2,9,194,196;
}
script=end
so far it shoots somewhere to the left at the slowest possible speed
edited 1×, last 11.01.11 08:36:40 am
for speed, change timer time in both lines
1
timer "self",3000,0;
and to change coordinates of fire, use lines in on:timer{ thing like that:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
on:timer { local $x,$y,$z; $x=getx("self"); $y=gety("self"); $z=getz("self"); $x+=5; $y+=28; $z+=5; projectile 29,$x,$y,$z,2,9,194,196; }