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 221 22 23121 122 Next To the start

old Re: Scripting Questions

Soki
User Off Offline

Quote
Brandon has written
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?

why would you want to stop that?

Flying Lizard has written
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.


Is this an example of the dialogue? Oh and I have the msgbox appear when you "use" a person, but do not know how to put that chekc box so you can reply and actually have a chat with the NPC. I am also still a little lsot with the trading...sorry for the questions and all and thank you very much for answering them :]

old Re: Scripting Questions

Soki
User Off Offline

Quote
Flying Lizard has written
please don't use the bold tag on you whole text, it's just for marking parts.

You should use s2 cmd dialogue for what you want, it's a lot easier for you


Sorry for the bold. I just think it is easier to notice when there are quotes. As for that dialogue help you are trying to help me with. The link does not help at all. I click it and all it says is dialogue. That doesn't help much, seeing how I already know its called dialogue...

old Detecting pickup from storage

Getch
User Off Offline

Quote
on:collect can detect when I have picked up an item from the ground with the USE key. Is there a way to detect when I have taken the item from a storage?

Also, on:inhand can detect when I have equipped a weapon. Is there a way to detect when it has been unequipped?
edited 1×, last 16.04.08 07:35:14 pm

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@Soki
Ah sorry, I always forget this. The Refferenzes of S2 are only available in German at the moment. You've got to switch the hp to German, and put it in Babelfish or something.

@Getch
1. afaik that's on:collect, too.
DC should change this

2. no, at the moment there is no way to do this. DC should implement this too

old Re: Scripting Questions

Getch
User Off Offline

Quote
Quote
The Refferenzes of S2 are only available in German. You've got to switch the hp to German, and put it in Babelfish or something.


If anyone else is confused, "switch the hp" is done by clicking the German flag.

Here is a link to a Google language tools mangled "translation" of the page containing all the commands.

Flying Lizard has written
1. afaik that's on:collect, too.
DC should change this


It doesn't work, for me anyway. on:collect only seems to fire if I pick stuff up off the ground. Maybe I just have to change what I am trying to accomplish.

old Re: Scripting Questions

Getch
User Off Offline

Quote
Flying Lizard has written
You do know that items loose there scripts when they are storred somewhere?


You mean that they lose any scripts tied to the particular item ID of the item, as opposed to the type of item? That would make sense because the specific item is now just part of a count of items of the type. I didn't think about that.

That couldn't have been the problem with my experimentations with the on:collect trigger because my script was part of the base definition of the item in the sys/items_weapons.inf.

Yes, I'm messing around with a mod, pretending to myself that I will actually do something useful with it. I think I have a better idea for accomplishing what I am trying to do (loading firearms) anyway, so I don't think I need to get on:collect from storage to work.

One last silly thought: it would make my life tremendously easier if there were an item behavior that acted like a weapon (to share in the weapon rate cooldown) but neither required ammunition nor supplied any visual or audible effects. I'd script the damage & effects myself. There's not some behaviour that I am overlooking, is there?
edited 1×, last 17.04.08 06:41:54 pm

old Re: Scripting Questions

Soki
User Off Offline

Quote
Flying Lizard has written
@Soki
Ah sorry, I always forget this. The Refferenzes of S2 are only available in German at the moment. You've got to switch the hp to German, and put it in Babelfish or something.


Alrighty, I will do so. Thanks.

old Edit/Test Cycle

Getch
User Off Offline

Quote
I'm playing around with a mod (hence editing the sys files), and I'm finding the edit/test cycle to be a bit long. Is there a way to start up Stranded on my test map and bypass all the menu clicks?

Also, has anyone worked up syntax highlighting or something for a text editor? Right now I've been switching back and forth between Notepad++ & Emacs. Both of them support highlighting, but I haven't invested the time write the necessary definitions. Is there something else I should look at?

@Soki:

Be careful about auto-translated versions of the command reference pages. The translation tools can change word order. This is legitimate, since word order does vary between German and English, but can be confusing when the original word order was not a sentence. Google's mangled translation of the Projectile command is particularly deceptive. Even if you don't read German, side-by-side comparisons will help guard against the translator tool trying to give you a new order for the parameters.
edited 3×, last 22.04.08 07:17:54 pm

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
What about some list of conditions what are usable in s2 cmd if ? I know a lot of them, but I§d like to know all of hem

old Re: Scripting Questions

Amritsar
User Off Offline

Quote
Sorry to just barge in randomly but I know basically know none of the if commands so I can't help.

But I really need to know what the following error means.

Error!

ID between 1-225 expected!

*************************************
It happens when the loading bar gets to objects and I expect it's because of me adding in a cherry tomato bush, commands for growing it and the cherry tomatoes themselves. Does that mean the ID numbers cannot go above 225? Because Massive Mod goes to the thousands and 225 is a very restrictive number...

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
you can change the maximum number of ids with the corresponding parameter in the game.inf

search for
limit_objects=255
limit_units=100
limit_items=255

old Re: Scripting Questions

Who me
User Off Offline

Quote
sry for the (probably) obvious question... but how do you make something appear? I put

create "Units", 30[,647, -931][;1];

to make a sailboat appear, but i think im getting the class wrong... help would be appreciated... thxs

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
1
$id=create("unit",30,647,-931,1);
You can choise different variable than "id". This variable contains ID number of created item/object/unit
So the mistake was in this and with the brackets. The square bracket means its optional parameter of the script...

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
Is it possible to make an area dark(as night) when it's daytime?
I'm making a "cave" and the game is lighting the interior as if it was open the the sun.
To the start Previous 1 221 22 23121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview