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 228 29 30121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Raven Shadow
User Off Offline

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

alt Re: Scripting Questions

Miner
User Off Offline

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

alt Re: Scripting Questions

GreyMario
User Off Offline

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

alt Re: Scripting Questions

Raven Shadow
User Off Offline

Zitieren
GreyMario hat geschrieben
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.

alt Re: Scripting Questions

Gast

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

alt Spawning question

Gast

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

alt Re: Scripting Questions

bezmolvie
User Off Offline

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

alt Re: Scripting Questions

Gast

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

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Gast

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

alt Re: Scripting Questions

bezmolvie
User Off Offline

Zitieren
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.
1× editiert, zuletzt 05.06.08 10:54:36
Zum Anfang Vorherige 1 228 29 30121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht