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 220 21 22121 122 Next To the start

old Re: Scripting Questions

Brandon
User Off Offline

Quote
@ guest 1.

Mix explosion script and set pos script.
(I don't know the details.)

@ guest 2.

You should use .txt files (or any other files) to make that

Learn from -maps\adventure's s2s files.

@ new map making guest.

No way to make that longer.
you have to use time trigger to make that msg again.

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@Brandon
please, if you don't know enough to give correct answers, don't try it, ok?

@Guest (1,2,3 is the same)
We don't give complet scripts, since you've got to learn it. we just help you.
1:
with s2 cmd distance you can check the distance between the player and your fort, you jsut have to make a very short timer thats started over and over again, until the fort has exploded.
2:
you should have a look at s2 cmd dialogue it's german, but maybe you can still understand it when you've put it through babelfish.
3:
again, ahve a look at the preferences s2 cmd msg


@ESKARN
first, the command is freestored, not freestore
and you just have to set the type parameter to "all", then everything is deleted.

old Re: Scripting Questions

Getch
User Off Offline

Quote
Getch has written
I want to put some coconut palms at the start point. They should have coconuts on them right away, rather than having to age to get them.

How do I force a plant to get fruit on day 1?


Is this not possible? Perhaps the question has been missed?

old Re: Scripting Questions

DC
Admin Off Offline

Quote
in the editor: click at the palm to open its menu and press the "spawn"-button several times (the button with the circle and the checkmark) until coconuts appear in the items list of the palm.

or use a script like this one:
1
2
$itemid=create("item",COCONUTTYPEID);
store $itemid, "object",PALMID,2;
replace COCONUTTYPEID with the item type id (definition id) of the coconut and PALMID with the ID of the palm. the parameter 2 automatically places the item (coconut) on the right position of the object (palm)

old Re: Scripting Questions

Gregg
User Off Offline

Quote
Since I don't know about scripting you could just put the cocunuts on the floor, so it's quicker to get (no need to build a sling shot) and so that it looks like they have fallen on the floor.

Sorry- not really a script related answer, but I hope it helps.

old Re: Scripting Questions

Guest

Quote
Flying Lizard has written
@Guest (1,2,3 is the same)
We don't give complet scripts, since you've got to learn it. we just help you.
1:
with s2 cmd distance you can check the distance between the player and your fort, you jsut have to make a very short timer thats started over and over again, until the fort has exploded.
2:
you should have a look at s2 cmd dialogue it's german, but maybe you can still understand it when you've put it through babelfish.
3:
again, ahve a look at the preferences s2 cmd msg


i dont understand what you mean in 1 and in 2 where is this diolouge thing and i understand 3 perfectly

old Re: Scripting Questions

Guest

Quote
guest 1 2 & 3 has written
Flying Lizard has written
@Guest (1,2,3 is the same)
We don't give complet scripts, since you've got to learn it. we just help you.
1:
with s2 cmd distance you can check the distance between the player and your fort, you jsut have to make a very short timer thats started over and over again, until the fort has exploded.
2:
you should have a look at s2 cmd dialogue it's german, but maybe you can still understand it when you've put it through babelfish.
3:
again, ahve a look at the preferences s2 cmd msg


i dont understand what you mean in 1 and in 2 where is this diolouge thing and i understand 3 perfectly


ok i cant get 3 to work
on:msg "Message" [,1] [,10]
am i doing something wrong?

old Re: Scripting Questions

DC
Admin Off Offline

Quote
yes. everything is wrong...
you really should read the basic tutorial about scripting!
http://stranded.unrealsoftware.de/s2_scripting1.php

1. there is no on:msg-Event! msg is a scriptcommand. script commands are not used with on:! only events are used with on:!
its done this way
1
2
3
on:event {
	msg "yourmessage",1,3000;
}
event has to be replaced with a valid event like start, load etc.

2. no "[" and "]"! never use this in your scripts. the command reference uses these brackets to show that a parameter is optional! thats it. don't use them in your scripts. SII will not understand this.

3. the duration the message is showed (in your script 10, the third parameter) is too short. the value is measured in milliseconds. 1000 milliseconds = 1 second. you will barely see a message which is showed only a 1/100 second. leave the parameter out (its optional! thats why there are [] in the reference) to show the message for 3000 ms (3 secs) or enter a higher value.

4. add a semicolon ( ; ) after every command (or after the last parameter of each command) like I did it in the script above. (but only after commands NOT after events or the brackets of events)

old Re: Scripting Questions

Guest

Quote
DC has written
yes. everything is wrong...
you really should read the basic tutorial about scripting!
http://stranded.unrealsoftware.de/s2_scripting1.php

1. there is no on:msg-Event! msg is a scriptcommand. script commands are not used with on:! only events are used with on:!
its done this way
1
2
3
on:event {
	msg "yourmessage",1,3000;
}
event has to be replaced with a valid event like start, load etc.

2. no "[" and "]"! never use this in your scripts. the command reference uses these brackets to show that a parameter is optional! thats it. don't use them in your scripts. SII will not understand this.

3. the duration the message is showed (in your script 10, the third parameter) is too short. the value is measured in milliseconds. 1000 milliseconds = 1 second. you will barely see a message which is showed only a 1/100 second. leave the parameter out (its optional! thats why there are [] in the reference) to show the message for 3000 ms (3 secs) or enter a higher value.

4. add a semicolon ( ; ) after every command (or after the last parameter of each command) like I did it in the script above. (but only after commands NOT after events or the brackets of events)

wow i feal soo stupid

old Re: Scripting Questions

Soki
User Off Offline

Quote
I have introduced this game to many of friends and we are all addicted to your game! I was the first to beat it (between us). After we all beat it, we decided to work together on created a great map. The problem is the scripting part to make it fun and have a "real" story. I have read the scripting tutorial and did not understand it all to well...the variables was a bit confusing till I tested it out...the other sections were not too bad, but not everything was covered... Well, I am new to this scripting on Stranded II and have plenty of time on my hands. I would like to know the following:

1. How do I add a diary entry?

2. How do I allow the player to talk to the NPCs?

3. How do I allow the player to trade with NPCs?

4. What is the
Quote
,"Source"
in
Quote
diary "Title" [,"Source"]
?

Please be as specific as possible...please...

P.S. Thank you very much in advance...here is a FREE cookie for your help cookie
edited 2×, last 10.04.08 03:18:09 pm

old Re: Scripting Questions

ESKARN
User Off Offline

Quote
one more question how do you keep the player inventory when you go to the next map


eg
on:use
loadmap

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@Soki
maybe no one has seen it?

1. you already seem to have found the correct command, but you made the same mistake everyone new makes, you mustn't put the [] in the script. They're just there to mark that you can leave a parameter away.

2/3. have a look at s2 cmd dialogue

4. You can put an the ID of a textcontainer there, wich script is loaded as the text of the diary. Or you can put the name of a text file in there. If you leave it away, the text in the buffer is used.

@Eskarn
there are some parameters in s2 cmd loadmap concerning about that.

old Re: Scripting Questions

Soki
User Off Offline

Quote
thanks for taking a look and answering the questions. I have found out how to do the diary and msgbox when you read a sign and all that small easy stuff. I'm now trying to figure out how to do the more complicated stuff after I get the talking and trading done with. The dialogue didn't help much, since it only says "dialogue"...and yes I did click the link. Do I do the same with the signs and diary, but instead of that command put "dialogue"? One more thing. What do you mean by
Quote
If you leave it away, the text in the buffer is used.
?

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
the buffer is some kind of big variable in S2. with s2 cmd add you can put text in there.

And I couldn't understand the rest of your question

old Re: Scripting Questions

Soki
User Off Offline

Quote
Flying Lizard has written
the buffer is some kind of big variable in S2. with s2 cmd add you can put text in there.

And I couldn't understand the rest of your question


Well, can you show me an example of how the script would look?

And is there any global script needed?

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
There is never a global script needed, you're always able to put everything into a local script.

An example would be something like

1
2
3
4
5
6
7
on:use {
add "Hi, this is a text";
add "It's from the buffer, you can make as many lines as you want.";
add "";
add "this was an empty line";
msgbox "example";
}

But I nearly never use that solution, I don't like it. But sometimes (especially with variable texts) it's usefull.

old Re: Scripting Questions

Brandon
User Off Offline

Quote
Well, I think I finish adventure more than 20 times..

Anyway, how can I make a picture that blocks all the screen like ending of the adventure?

"congratulation~"<- something like that?
To the start Previous 1 220 21 22121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview