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 228 29 30121 122 Next To the start

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
Gregg has written
I agree with Mario, there should be something lke "page1b". Try looking in the Stranded Scripts for an example.


It's not that i'm trying to understand the script the example is taken from.
It the difference in the 2 examples i need to understand.

The in game editor, i believe, says it shouls be
button ID, Text [,Icon][,Script]
and not button ID, Text [,Script][,Icon]

Which is correct the website or the editor?
(the editor's description matches up to the
example better)
What does the 17, in the example, refere to?
Does [script] have to be an event pointer, or
can it point to a file?

Does ID have to literally be a number or can
it be a variable with a positive value?

I think that's all

old Re: Scripting Questions

Miner
User Off Offline

Quote
HeHE.. Tellin i have a bad english ;]. I'm from Poland :). Ach and I mean that command reference is avaible only in german :/. There is a message saying "...this is going to be translated". And I'm thinking that it gonna be english, not Polish .

old Re: Scripting Questions

GreyMario
User Off Offline

Quote
Yeah, it's being translated to English.

You might get better results translating the English translation to Polish (or whatever it is you crazy people speak there :P) than translating the German reference to that same language. Might be worth a try to wait for the reference to be translated to English.

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
GreyMario has written
Yeah, it's being translated to English.

You might get better results translating the English translation to Polish (or whatever it is you crazy people speak there :P) than translating the German reference to that same language. Might be worth a try to wait for the reference to be translated to English.


Waiting that long won't help me with what i'm trying to do now.

old Re: Scripting Questions

Guest

Quote
LOLZ! I have real bad english or you dont read 5 posts "@up" (can't find word.... ) ...

old Spawning question

Guest

Quote
Ok, I have run into a snag but have figured out most stuff for myself through painful hours of trial and error and frustration met with the eventual delight of seeing it actually work. I have never coded anything besides html in my life so bare with me. This time I want to take a shortcut. I figured out the code for making things spawn on trigger but how do you make something spawn from another trigger when you walk on one trigger? For instance you have stepped on a trigger on the left side of the hill and a raptor spawns from the trigger on right side of the hill.

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
Instead of
1
Create"unit",2;

you put
1
create"unit",2,xpos,ypos,zpos;

xpos is x position, y is Y position, and so on. These should be replaced with numbers, for example,

1
create"unit",2,1320,10,3265;

old Re: Scripting Questions

Guest

Quote
Bloodshot has written
Instead of
1
Create"unit",2;

you put
1
create"unit",2,xpos,ypos,zpos;

xpos is x position, y is Y position, and so on. These should be replaced with numbers, for example,

1
create"unit",2,1320,10,3265;


Wow that was fast, you are awesome!

How do you determine position? Is it the camera positon thats always shown at the bottom of the screen? If so if say xpos, was negative 1320 would you type in -1320?

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
yup. If you wanted to get the position of a object, unit, or item, you would use getx, gety, or getz, in this form.
1
getx("unit",1);
getx gets the x position of the "unit", with the id of 1. This is the player. Since this is a return comand, you should use a variable. For example
1
$xx=getx("unit",1);
Then to set a position of an object, unit, or item that already exists, you would use the setpos command.
1
setpos"unit",1,$xx

old Re: Scripting Questions

Guest

Quote
Bloodshot has written
yup. If you wanted to get the position of a object, unit, or item, you would use getx, gety, or getz, in this form.
1
getx("unit",1);
getx gets the x position of the "unit", with the id of 1. This is the player. Since this is a return comand, you should use a variable. For example
1
$xx=getx("unit",1);
Then to set a position of an object, unit, or item that already exists, you would use the setpos command.
1
setpos"unit",1,$xx


Ok so for instance with that code you could tell the raptor to spawn by a certain tree? If so how does it know which tree?

Or does it say activate the spawning of a raptor when the player steps here?

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
First, you have to find out the ID of the tree. This is only really possible in the editor. Then do
1
2
3
4
$TreeRaptorX=Getx("object",the ID of the tree);
$TreeRaptory=Gety("object",the ID of the tree);
$TreeRaptorZ=GetZ("object",the ID of the tree);
Create "unit",2,$TreeRaptorX,$TreeRaptorY,$TreeRaptorZ;

The TreeRaptorX, Y, and Z variables can be any name you want, as long as you have a dollar sign before them.
edited 1×, last 05.06.08 10:54:36 am
To the start Previous 1 228 29 30121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview