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 2113 114 115121 122 Next To the start

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
Hurri04 has written
@gusanos33:
it is impossible to build objects in the air ingame.
what you can do is move objects upwards when you are in the editor mode by pointing the mouse at the object and pressing space. by doing this three orbs at the end of three lines that are arranged in right angles and form a corner will appear. by clicking and holding the mouse button at one of the orbs you then can moce it into different directions.
to dissable this mode again, simply press space a second time.


It's technically NOT impossible. If you know something about modeling, you can open up your model in an editor and simply lift the entire object up the Y axis and save it at a new altitude. The side effect of this is that the game still puts the placeholder for the building on the ground, but hey, that might be what you wanted.

old Re: Scripting Questions

DannyDeth
User Off Offline

Quote
Pupp3t has written
Yeah, I just downloaded the source code and Blitz 3D. So, I'm gonna try and see if I can edit the codes and stuff. I'm not sure how, but I'll try heh.

Lol, you can't use the demo to compile. You have to buy the real thing, which costs 100$US

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
Psytechnic has written
It's technically NOT impossible. If you know something about modeling, you can open up your model in an editor and simply lift the entire object up the Y axis and save it at a new altitude. The side effect of this is that the game still puts the placeholder for the building on the ground, but hey, that might be what you wanted.

yes, but I think he's talking about the original game and not about a modification or something.
of course lifting the model on the y-axis in a 3D-editor is a possible solution but I don't think that's what he meant.

old Re: Scripting Questions

aimeewilbury
User Off Offline

Quote
I tried to make a script to tame and ride a parrot. However the parrot does not fly when you ride it. Is this a limitation or did I forgot something?
edited 1×, last 02.12.10 07:59:30 pm

old Re: Scripting Questions

aimeewilbury
User Off Offline

Quote
Its just this

1
2
3
4
5
on:use { 
	//Ride when tame!
	if (gotstate("self","tame")) {
		ride;	
	}

And the appropriate thing in the items.inf (I throw grain at the parrot)

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
the problem with this is that the parrot does not have the "aircraft" behaviour which e.g. the plane has.
it also does not have the definitions for acceleration, friction, steering and flyspeed and such which the plane has.

old Re: Scripting Questions

Shagabash
User Off Offline

Quote
1
2
3
4
5
on:use
	{
	count_stored "unit",1,99 = $hermitrep;
	msgbox "$hermitrep";
	}

When I use it, the msgbox just says '0', even when I have different amounts of slime(99). Hermitrep was already defined (as 0) in the global code. Why doesn't it change?

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
you also have to write brackets around the parameters of a command which returns a certain value to e.g. a variable.
1
2
3
4
on:use {
	$hermitrep=count_stored("unit", 1, 99);
	msgbox "$hermitrep";
}
but the value of the variable will just be used as the title of the messagebox, not as the actual text in it. just wanted to say in case you didnt know.

old Re: Scripting Questions

Shagabash
User Off Offline

Quote
Oh, ofcorurse, I had the variables switched around. I don't recall needing to have brackets there, but thanks, it worked.

EDIT: Another question... I made a long message box. It had an error, and it said I should use an Info or a Text Document. How can I do this? I've been trying, but I can't seem to do it right.
edited 1×, last 04.12.10 01:00:21 am

old Re: Scripting Questions

Xaeveax
User Off Offline

Quote
You need to make a text file (probably in the stranded folder) and then where you would normally write
msg "blablablah"; you need to link to the file (meaning name the folder its in and what its called.) sorry. that all sounded really odd.

for example, i used this for an item i made.

1
2
3
on:use {
		msgbox "Death Note","sys\scripts\deathnote.txt";
	}

The name of the message box is Death Note, and then link it to the text file. hope it helps

(Since I'm talking about this now, does anybody know a way to script it so that you can type stuff in game? Like maybe write your own diary entries to keep track of whatever you need?)

old Re: Scripting Questions

Shagabash
User Off Offline

Quote
Jesterhead37 has written
You need to make a text file (probably in the stranded folder) and then where you would normally write
msg "blablablah"; you need to link to the file (meaning name the folder its in and what its called.) sorry. that all sounded really odd.

for example, i used this for an item i made.

1
2
3
on:use {
		msgbox "Death Note","sys\scripts\deathnote.txt";
	}

The name of the message box is Death Note, and then link it to the text file. hope it helps

(Since I'm talking about this now, does anybody know a way to script it so that you can type stuff in game? Like maybe write your own diary entries to keep track of whatever you need?)


Thanks, that's what I was looking for.

As for your question, yes there is. Well, from what I can tell. I was just messing around with the interface commands... and one of them let you type something. So just look around at those and I think you'll find something.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
@Shagabash:
Jesterhead37 has written
1
2
3
on:use {
		msgbox "Death Note","sys\scripts\deathnote.txt";
	}

the text file can also have the format ".s2s" which you also can open with any text editor. just sayin'



@Jesterhead37:
I think this is the command you are looking for: s2 cmd inputwin
sorry, the description of the command is not available in english but the names of the parameters should speak for themselves.
curiously one parameter ("Bild") is missing in the english description, it means "Image", so you can put a path to an image there which will be shown as a background-image in a centered position.

old Re: Scripting Questions

Xaeveax
User Off Offline

Quote
@Hurri04
     
Ok awesome! I'll be sure to give it a try! Hopefully I can figure it out so that when certain words are typed, certain things happen. Maybe...

old Re: Scripting Questions

Shagabash
User Off Offline

Quote
Well, I haven't tried it, but if you can save a variable's value as a name, and make it so s2 cmd inputwin retrieves what you typed in, you sure could.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
yes, you can save what you wrote in the inputwin in a variable:
1
$text=inputwin("Enter a word!", 0, "Cancel", "Okay");
if you want to give a string (a row of letters) to a variable you have to put them into quotation marks:
1
$text="Blabla";
More >

however, if you want to use the text in the variable, e.g. in a diary entry or a s2 cmd msg you also have to put it into quotation marks:
1
msg "$text";
More >

old Re: Scripting Questions

Xaeveax
User Off Offline

Quote
Quote
Well, I haven't tried it, but if you can save a variable's value as a name, and make it so inputwin retrieves what you typed in, you sure could.


Awesome! I'll try a few things.

Quote
That.. would be pretty awesome!
A death Note, that can kill any one in front of you... Genius there.


That's the plan! I'll probably end up uploading it when I'm done if people want it. (and if it works)

(Thanks Hurri04! That helped alot! :P) If it isn't too much to ask, do you think you could show me how I would type it in? Like, maybe as an example? I don't yet know how to use variables.
To the start Previous 1 2113 114 115121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview