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 2121 122 Nächste Zum Anfang

wichtig geschlossen verschoben Scripting Questions

DC
Admin Off Offline

Zitieren
This thread can be used for questions concerning scripting in Stranded II.

You can get a (german) commandlist here:
http://www.stranded.unrealsoftware.de/s2_commands.php
(this is going to be translated)

And please read the scripting tutorial (thanks for the translation by ewok!):
http://www.unrealsoftware.de/forum_posts.php?post=51341#lastpost

Edit:
There is now a forum for scripting questions.

√ please create a new thread for your question

√ don't forget to use the search function to find comparable threads first

√ this thread will stay here so you can use it to find existing problems/solutions
2× editiert, zuletzt 04.04.11 15:20:16

alt Re: Scripting Questions

E_net4
User Off Offline

Zitieren
Here I go with the first questions:

- What's the command to assign a state to our player (how to make him bleed, etc)
- How do you add a diary entry?
- I want the player to not use his hands to hit, like in the map "Tower Defense". How do I do this?

alt Re: Scripting Questions

DC
Admin Off Offline

Zitieren
the player id is 1 (npc ids are starting at 100)

the arcade mode disables hunger, thirst and exhaustion.

alt Re: Scripting Questions

EwokChieftain
User Off Offline

Zitieren
1. No, according to "units.inf" it is 1.
2. No thirst, no hunger, no tiredness, nothing that would annoy you in an arcade game.

Before you ask the whole command reference, just have a little more patience - DC has just announced he will release Gold really, really soon.
Tomorrow, probably.
And I guess this means that soon after that there will soon be an official English version and an official English website.

Edit: too late

alt Re: Scripting Questions

E_net4
User Off Offline

Zitieren
I can't wait for it!
I'll be playing StrandedII on my Summer Holidays! (It's next week)

My script isn't working. It claims to have an error in the following line:
1
if ($color1==$clr1)&&($color2==$clr2){
Edit: I found the Problem. Forgot Extra "()"

By the way, how do I remove a state?
1× editiert, zuletzt 19.06.07 23:03:29

alt Re: Scripting Questions

Builder2-0
User Off Offline

Zitieren
How can I see is being attacked? Or rather, how can I attatch a script to an item to see if I'm hitting it?

I want to raise a skill every time I hit a stone. Is that possible?

-Builder

alt Re: Scripting Questions

Gast

Zitieren
Yes, it is possible. Add the skill, and define an event "iskill_mine". Check in (I think) game.inf for the other iskill events.

Although I hate you for your mod because the ideas are leeched off others posted before yours - not saying deliberately. Just saying, other people posted them before you.

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
Gast hat geschrieben
How do I loop a set amount of times, with a number?


1
2
3
4
5
s2:local $i;
s2:loop("count",[i]Number[/i]) {
$i=s2:loop_id(); [i]//current iteration[/i]
}
s2:freevar $i;

Nick99 hat geschrieben
Is there a page somewhere with all the events from teh game?

see s2 cmd on

ragnaro2 hat geschrieben
I found how to make a path for my unit, although i need to know how the unit will repeat the path.


Code for the unit (example):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
s2:on:start {
s2:local $i;
$i=s2:currentid();
s2:unitpath $i,1,2,3,4,5; [i]//Or any other[/i]
s2:freevar $i;
}

[i]//fired when last node in path reached.
//in this case, 5.[/i]
s2:on:node0005 {
s2:local $i;
$i=s2:currentid();
s2:unitpath $i,5,1,2,3,4,5; [i]//Or any other, restart with last point![/i]
s2:freevar $i;
}

alt Re: Scripting Questions

ragnaro2
User Off Offline

Zitieren
Thanks, finnaly i can make my stuff loop I have my last and final question. on the msgbox I have my stuff written in and I need help how to make an option to buy stuff out of it. So like I will trade in my bark for a shotgun or etc. Like a trade system.

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
make an info with the script and add following under the s2 cmd msgbox-command:
1
s2:button 0,"Trade...",0,[i]ID of the Info[/i];
There can be max 10 buttons (first number, 0-9).
The second number (after "Trade...") can be either a number (to choose an icon from the internal icons) or a filename to a bitmap.

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
the info-object on the map which contains the trading script has an ID.
Use it there.

You also can load the script from a file to the buffer, in this case you can skip the last parameter.

alt Re: Scripting Questions

Builder2-0
User Off Offline

Zitieren
desu~ hat geschrieben
Yes, it is possible. Add the skill, and define an event "iskill_mine". Check in (I think) game.inf for the other iskill events.

Although I hate you for your mod because the ideas are leeched off others posted before yours - not saying deliberately. Just saying, other people posted them before you.

That's not really what I meant. I've got the skill made. However, I'm not sure if there is any way to detect the player *hitting* a stone. Specifically hitting a stone.

PS: 1. I never intented to make a large release of my mod. I was told to.

2. It was a personal mod.

3. I strived for quality & quantity. I wanted to add lots of new features & items, but do it with quality.

4. Point me to a mod that adds forging, or allows you to refill water bottles, or is working on coal mining and steel forging.

5. I did not look at the work of any other modder before starting my mod. I have not stolen any scripts, any textures, anything. All of this work is my own.

6. I did not intend to make enemies when I released this. I had no ideas you guys would be so volatile to a new mod, I thought you might actually like having more to choose from.

Good day.

-Builder
Zum Anfang Vorherige 1 2121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht