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 224 25 26121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Gast

Zitieren
How do I use inarea_fish? I want my fishing areas to get back 10-15 fish every week.

alt Re: Scripting Questions

Gast

Zitieren
Also, if someone could tell me how to make a teleporter that transports you to somewhere else on the island that'd be AWESOME.

alt Re: Scripting Questions

AdidasOFC1
BANNED Off Offline

Zitieren
you just have to add a script with s2 cmd setat or s2 cmd setpos (and maybe a s2 cmd flash effect)... hint:the player is unit 1

post before: use a spawn control

mrcowthing: try this:

script=start
on:inhand {
     $me=currentid();
     timer "item",$me,1000,1;
}
on:timer {
     $me=currentid();
     if (getplayerweapon()!=$me) {skip;}
     msg "tick";
     timer,"item",$me,1000,1;
}
script=end

alt Re: Scripting Questions

Gast

Zitieren
Sweet that worked, now could you give me a example script of inarea_fish?

alt Re: Scripting Questions

Gast

Zitieren
Sorry I couldn't find it, but how do I include additional buildings in the buildmenu?
It looks like the game ignores them, I.E. I've added a building but I don't see it in buildings meny (it's unlocked) but when I replace the vanilla building (just IDs) it's avaliable for building...

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
Gregg: Yeah, that should work. I think > consume energy, hunger, thirst, fatigue will give a different sound or perhaps none at all. Then again, there IS the issue of an extra "Found Pebble (1x)". You can likely circumvent that by spamming > msg "(null)".


EDIT: While I'm here with the last post in the thread, how do I go about an if-then that checks to see if the player is alive and if so, damage player by 50 and give the player a message? I've got the damage player and message part done, I just need to know exactly how to do the if-then.

EDIT TWO: Okay, found that in the reference. The check is s2 cmd lives "class", ID (Returns whether an object of class class and ID ID is alive. Since only units can exist dead, it is largely identical to the command > exists) for those who are interested.
2× editiert, zuletzt 18.05.08 08:49:33

alt Re: Scripting Questions

ohaz
User Off Offline

Zitieren
you could have also done it with a "if" test, wether his lifepoints are above zero or not

alt Re: Scripting Questions

MrCowThing
User Off Offline

Zitieren
Is there a command that will return any of these, the current weight your holding, the max weight you can hold, or how much weight is left?

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
Okay, got one I can't figure out.

I'd like to know how to trigger some script on dig.

EDIT: dur, there I go again. I post before looking at the list. > on:dig
1× editiert, zuletzt 18.05.08 21:30:09

alt S.O.S!

lint35
User Off Offline

Zitieren
I would like some help please, I am trying to make a weapon that you can hit it against something once then it will break (it will be like a wooden sword) and the bomb thing with the getx"item",123 thing dosn't work, it says that the item with the Id of 123 dosn't exist (which it does of course!!)

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
You need to do the explosion at getx("unit",1), gety("unit",1). getz("unit",1) because you are holding the item.

Also, the item with the ID of 123 does not exist because the 123rd non-cumulative item has not come into existence yet.

alt Re: Scripting Questions

Gast

Zitieren
I have a question - on my custom island I have problem with lights. It looks like they burn but do not light area around (and any object with light).
I can make a new map and there I have a nice light effects, but not on my map (which has just 1 dialogue starting script and nothing more pre-defined). The objects have behaviour "torch" but do not light anything.

2nd question - where to define what o behaviours do? (like "torch", "blade" etc.).

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
behaviours are pre-defined. you can't change them or create your own ones. you have to use scripts in the definition of objects to modify them.

the torch problem can have several reasons:

- the radius of the fire light is too small to light the environment. maybe you have to add an additional light state with a larger radius

- the maximum of visible lights at the same time is limited to 8 or something like that. if you have too many lights some will not be visible.

- the light is inside oder under the model and can't illuminate the environment. use state=X,Y,Z in the definition of the object to define where the light should appear in relation to the position of the model. the normal torch for example has state=0,39,0 to make the effects appear at its top.

- the whole light stuff is not very precise because its based on vertices not on textures. so if there are not enough vertices in the environment around the light it might lead to the problem that the light is barely visible.

alt Re: Scripting Questions

GreyMario
User Off Offline

Zitieren
You're sure it's not a batch file? Try dragging it into Notepad, you'll see the inner workings of it if it's a batch file.
Zum Anfang Vorherige 1 224 25 26121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht