Forum

> > Stranded II > Scripts > Scripting Newbie
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Newbie

9 replies
To the start Previous 1 Next To the start

old Scripting Newbie

Falzarrazor
User Off Offline

Quote
I have many scripting problems. The following are some:

I want to start a map with a diary entry but I don't know how to create a correct one. I tried many times but I can only create the title without content about the title.

How to write an ending script for me to be able to create a map with an end upon completing the necessary objectives.

old Re: Scripting Newbie

Falzarrazor
User Off Offline

Quote
You mean the s2 and s2s files? I tried opening them several times but I don't know the right program to use.

old Re: Scripting Newbie

Stranded_Guy2910
User Off Offline

Quote
I had the same problem and as I saw, no one really understood your problem. You're probably using this script:
1
2
3
on:start {
diary "title","exemple\exemple.txt";
}
And in the exemple you're just writing the diary content aren't you? You have to do something like that:
1
2
3
on:start {
diary "title","exemple\exemple.txt","exemple";
}
The last parameter is a kind of subtitle you'll determine in the file, in the case the "exemple.txt".

In the exemple.txt you'll do something like that:
1
2
\\~exemple
content of the diary
You'll probably use other diaries in your map, so for that you don't need write all this script again, just change the last parameter of the diary script I gave you above and add another diary content IN THE SAME FILE! Just like that:
1
2
3
4
5
\\~exemple
diary content

\\~another_exemple
another diary content
Remember to not use spaces in the subtitles

old Re: Scripting Newbie

Hurri04
Super User Off Offline

Quote
@user Stranded_Guy2910:
there is no fuckin' 3rd parameter at the diary command
check this out: s2 cmd diary
also, it's "example".


@user Falzarrazor:
• open editor
• place textcontainer info
• click on it, remember ID
• write some plain text into the scriptbox
• place area trigger info
• click on it
• set trigger radius and stuff
• write this into the scriptbox:
1
2
3
on:trigger {
	diary "Hello World", [ID of textcontainer goes here (without brackets!!)!!];
}
• press F12 for quicktest
• walk into trigger area
• inb4 shitstorm 'cause there is no break point for the trigger but you'll see how it works


• F12 again (back into editor), add this line below the second code line into the area trigger:
1
free "self";
• test again, now it only pops up once 'cause it's deleted after that

old Re: Scripting Newbie

Stranded_Guy2910
User Off Offline

Quote
user Hurri04 has written
@user Stranded_Guy2910:
there is no fuckin' 3rd parameter at the diary command
check this out: s2 cmd diary
also, it's "example".


I know it doesn't appears in the commands reference, but it works very well, until DC used it while creating the adventure of stranded 2. And I know my english is horrible . I'll only finish my english course in about 2 years, so till there I'll write exemple

EDITED: The steps you said should not work for the start of the map.

And about the end of the map creating another one, it depends on what objectives are necessary. But you just need to use the s2 cmd loadmap if you already know how to do the rest of the script for verifying if the objectives are complete, but if you don't know just send me a pm saying the objectives or just write it here.
edited 2×, last 08.05.12 10:46:40 pm

old Re: Scripting Newbie

Falzarrazor
User Off Offline

Quote
Thanks for the help! I finally got it. But I have more questions.

How to change the color of the text?
Is it possible to create some animations like the intro of adventure? If yes, how?
What is the command that will bring you back to the menu?
edited 2×, last 14.05.12 11:45:52 am

old Re: Scripting Newbie

Hurri04
Super User Off Offline

Quote
if you used the method I described you can change the color by writing an ! symbol at the front of a text line in the text container, followed by the number that resebles the color (see e.g. s2 cmd msg).
example:
1
!2this is some test text blahblah blubb
if a line in the text is so long that it is automatically seperated into multiple lines in the msgbox or whatever, you have to write !2 in front of the first word which is in the next line again.


for the "animations" have a look at the first adventure map in the editor.
these commands could also be useful:
http://www.stranded.unrealsoftware.de/s2_commands.php?list=sequences
+ s2 cmd unitpath


and I dont think there is a script command to return to the main menu.
edited 1×, last 14.05.12 12:46:24 pm

old Re: Scripting Newbie

Stranded_Guy2910
User Off Offline

Quote
user Hurri04 has written
if you used the method I described you can change the color by writing an ! symbol at the front of a text line in the text container, followed by the number that resebles the color (see e.g. s2 cmd msg).
example:
1
!2this is some test text blahblah blubb
if a line in the text is so long that it is automatically seperated into multiple lines in the msgbox or whatever, you have to write !2 in front of the first word which is in the next line again.


for the "animations" have a look at the first adventure map in the editor.
these commands could also be useful:
http://www.stranded.unrealsoftware.de/s2_commands.php?list=sequences
+ s2 cmd unitpath


and I dont think there is a script command to return to the main menu.


He can change the color doing this using my script and there's no way to return to the main menu but you can use the command s2 cmd credits
And did you already made all the objectives for your map? If not I recomend you to create a thread because I really didn't had time to write those scripts and I still don't have it
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview