Forum

> > Stranded II > Scripts > Scripting Questions
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Scripting Questions

2.429 Antworten
Seite
Zum Anfang Vorherige 1 220 21 22121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Brandon
User Off Offline

Zitieren
@ 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.

alt Re: Scripting Questions

Flying Lizard
User Off Offline

Zitieren
@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.

alt Re: Scripting Questions

Getch
User Off Offline

Zitieren
Getch hat geschrieben
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?

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
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)

alt Re: Scripting Questions

Gregg
User Off Offline

Zitieren
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.

alt Re: Scripting Questions

Gast

Zitieren
Flying Lizard hat geschrieben
@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

alt Re: Scripting Questions

Gast

Zitieren
guest 1 2 & 3 hat geschrieben
Flying Lizard hat geschrieben
@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?

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
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)

alt Re: Scripting Questions

Gast

Zitieren
DC hat geschrieben
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

alt Re: Scripting Questions

Soki
User Off Offline

Zitieren
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
Zitat
,"Source"
in
Zitat
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
2× editiert, zuletzt 10.04.08 15:18:09

alt Re: Scripting Questions

ESKARN
User Off Offline

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


eg
on:use
loadmap

alt Re: Scripting Questions

Flying Lizard
User Off Offline

Zitieren
@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.

alt Re: Scripting Questions

Soki
User Off Offline

Zitieren
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
Zitat
If you leave it away, the text in the buffer is used.
?

alt Re: Scripting Questions

Soki
User Off Offline

Zitieren
Flying Lizard hat geschrieben
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?

alt Re: Scripting Questions

Flying Lizard
User Off Offline

Zitieren
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.

alt Re: Scripting Questions

Brandon
User Off Offline

Zitieren
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?
Zum Anfang Vorherige 1 220 21 22121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht