English Scripting Questions

2,429 replies
Goto Page
To the start Previous 1 2 3 4 ... 121 122 Next To the start
17.07.07 08:41:06 am
Up
bizzl
User
Offline Off
the easiest way should be the click screen mode.
You can't emulate the original menus perfectly (no hover für images), but for most tasks it should be enough.
ACCOUNT IS DEAD, DO NOT CONTACT ME VIA PM, PLZ!
17.07.07 09:40:04 am
Up
Builder2-0
User
Offline Off
bizzl has written:
the easiest way should be the click screen mode.
You can't emulate the original menus perfectly (no hover für images), but for most tasks it should be enough.

You mean CSCR? If so, then yes, that is what I'm using. However, I thought that perhaps it would be possible to make the buttons "light up" when you mouse over them... Sad.

-Builder
19.07.07 10:29:48 am
Up
Guest
hey i have one question. I tried to make that you dont have to hit cotton bush to get some wool so i used the command (on:use find) but i don't know how to set when you use it to much that it dissapears. i hope you understand it.


PS: is there command list in English.
19.07.07 11:05:05 am
Up
bizzl
User
Offline Off
Gast has written:
hey i have one question. I tried to make that you dont have to hit cotton bush to get some wool so i used the command (on:use find) but i don't know how to set when you use it to much that it dissapears. i hope you understand it.


Implement a counter:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
s2:on:start {
     s2:local $amount;
     $amount=10;
}
s2:on:use {
     [i]//To delete the plant
     //use s2:damage "object",currentid(),10000;
     //instead of s2:skip[/i]
     s2:if ($amount==0) { s2:skip; }
     s2:find 48,1;
     $amount--;
}
s2:on:changeday {
     $amount=10;
}
ACCOUNT IS DEAD, DO NOT CONTACT ME VIA PM, PLZ!
27.07.07 10:19:11 pm
Up
LCL-the new!
How do you increase the player's speed(more than the bloodrush amount)? And how do you make it play MIDI files? It won't play them!
28.07.07 01:20:18 pm
Up
EwokChieftain
User
Offline Off
1. s2 cmd player_speed X;
2. As you rightly state, it won't play them. And that's it. They are not supported. You have to convert them.
IMG:http://home.arcor.de/ewokchieftain/Bilder/KSI.jpg
28.07.07 01:44:12 pm
Up
LCL-the new!
i tried player_speed,and it doesn't know what it is.
28.07.07 02:33:48 pm
Up
bizzl
User
Offline Off
LCL-the new! has written:
i tried player_speed,and it doesn't know what it is.

If a unit gets this state, it's speed will be the one given as state value, and not the one it has by default.
ACCOUNT IS DEAD, DO NOT CONTACT ME VIA PM, PLZ!
23.08.07 05:00:28 pm
Up
Jord
Whenever I try to script something it offers me syntax help in German and the scripts don't work properly, I even copied one from the Scripting Tutorials that failed to work. I have the latest English version for the website. Please help
23.08.07 05:45:34 pm
Up
HW
User
Offline Off
As long as the official Stranded II Site hasn't been translated, there will only be German documentation and syntax help. That no script works surprises me, however. Could you post one of those scripts you tried? And what errormessages do you get/what happens when you execute the scripts?
24.08.07 03:24:07 pm
Up
Starcom
User
Offline Off
Hi,

Can someone say to me if the title of process script command is displayed or not during the game ?

I ask about this, because I am looking for all script commands generating text on the screen. Actually, I think there is only "msg" commands, but perhaps I am wrong ?

thx
IMG:http://img118.imageshack.us/img118/9382/userbar568614je5.gif
Stranded 2 translator into French
24.08.07 03:29:08 pm
Up
AdidasOFC1
BANNED
Offline Off
process starts a progress with title, like eating. you see the title.

there are also: diary, msgboc and dialogue with text.

EDIT: and decisionwin
Ban reason: Hijacked account /DC
24.08.07 03:33:56 pm
Up
Starcom
User
Offline Off
Ok, thanks.
IMG:http://img118.imageshack.us/img118/9382/userbar568614je5.gif
Stranded 2 translator into French
24.08.07 10:14:05 pm
Up
Flying Lizard
User
Offline Off
there also is the command s2 cmd text and s2 cmd text3d
Worte sind wie Pfeile, man kann sie nicht zurücknehmen.
25.08.07 10:16:39 am
Up
Starcom
User
Offline Off
Thanx too, Flying lizzard, I would take a look .
IMG:http://img118.imageshack.us/img118/9382/userbar568614je5.gif
Stranded 2 translator into French
27.08.07 03:23:10 pm
Up
maor
User
Offline Off
is there a command that i can use to delete an ai?
(i want to delete all the butterflys from the map while i am in game)
27.08.07 03:52:01 pm
Up
bizzl
User
Offline Off
maor has written:
is there a command that i can use to delete an ai?
(i want to delete all the butterflys from the map while i am in game)

There is no difference between an Unit (AI) and anything else.
You'll have to loop over all occurencies of the butterflies and delete them:
Code:
1
2
3
4
5
6
s2:loop("unit",7) {
     s2:free "unit",s2:loop_id();
}
s2:loop("unit",6) {
     s2:free "unit",s2:loop_id();
}
ACCOUNT IS DEAD, DO NOT CONTACT ME VIA PM, PLZ!
02.09.07 11:51:27 pm
Up
Joku
User
Offline Off
Hello. I've just started on a mod that seeks to change the game in many ways, not just add a bunch of extra stuff. Because of this I will have a lot of scripting questions over the next week or two.

First question: I currently have things set up so that upon pressing a user-defined key, the map screen displays. I want to change this so that the map screen will only be displayed if the player actually has a map. I have failed in my attempts so far. Here is the functioning code I have in game.inf:

Code:
1
2
3
4
5
6
scriptkey=20, Map
script=start
    on:keyhit20 {
         map;
    }
script=end



Second question: Is there a way to determine the manner in which the player died? I want to make it so something happens when the player drowns, but not with any other kind of death. If not, is it possible to make something happen when killed by shark?

The following may not be a scripting question; it all depends on the answer, really. I want to get rid of hunger/tiredness, but keep thirst. The way I have done this so far is to change the health system to "2" (which gets rid of thirst and tiredness), change everything that normally affected thirst to make it affect hunger instead, change everything that affected hunger to make it affect nothing, modify the "if_values" image to get rid of the bottom two bars, and switch the images for the hunger and thirst bars. This seems to work well enough, but this stat is still listed as hunger in the stats menu. So my question is, is there a way to change the name of the stats in the stats menu, or is there a way to decide which stats are used when changing the health system?

More questions to come.
edited 1×, last 03.09.07 12:02:40 am
03.09.07 10:42:34 am
Up
bizzl
User
Offline Off
Joku has written:
Hello. I've just started on a mod that seeks to change the game in many ways, not just add a bunch of extra stuff. Because of this I will have a lot of scripting questions over the next week or two.

You'll need a bit more time to get a whole bunch of changes down and working
But why another mod? Why not help an existing one?

Joku has written:
First question: I currently have things set up so that upon pressing a user-defined key, the map screen displays. I want to change this so that the map screen will only be displayed if the player actually has a map. I have failed in my attempts so far.

That's easy:
Code:
1
2
3
4
5
6
7
8
scriptkey=20,Map
script=start
     on:keyhit20 {
          s2:if (s2:count_stored("unit",1,73)>0) {
               map;
          }
     }
script=end


Joku has written:
Second question: Is there a way to determine the manner in which the player died? I want to make it so something happens when the player drowns, but not with any other kind of death. If not, is it possible to make something happen when killed by shark?

Not directly. You can try it with on:ai_attack and a timer, but I don't think it will be a easy and well working script.

Joku has written:
The following may not be a scripting question; it all depends on the answer, really. I want to get rid of hunger/tiredness, but keep thirst. The way I have done this so far is to change the health system to "2" (which gets rid of thirst and tiredness), change everything that normally affected thirst to make it affect hunger instead, change everything that affected hunger to make it affect nothing, modify the "if_values" image to get rid of the bottom two bars, and switch the images for the hunger and thirst bars. This seems to work well enough, but this stat is still listed as hunger in the stats menu. So my question is, is there a way to change the name of the stats in the stats menu, or is there a way to decide which stats are used when changing the health system?

Try to find the string "hunger" in the strings.inf and change it to "thirst", that should do it.
ACCOUNT IS DEAD, DO NOT CONTACT ME VIA PM, PLZ!
03.09.07 04:34:38 pm
Up
Joku
User
Offline Off
bizzl has written:
You'll need a bit more time to get a whole bunch of changes down and working
But why another mod? Why not help an existing one?


True, I probably will need more time, but this isn't exactly a fully-fledged mod; it's only designed to work with one map.

But why my own mod? That's quite simple: I have my own story to tell.


bizzl has written:
That's easy:


It most certainly was. And by this, it is quite clear that I need to study all of the instructions some more. But I tend to lose a lot through Google Translate (which is why I'll be asking so many questions).


bizzl has written:
Not directly. You can try it with on:ai_attack and a timer, but I don't think it will be a easy and well working script.


Thanks. I'll see what I can do with it once I get to the point in the development process.


bizzl has written:
Try to find the string "hunger" in the strings.inf and change it to "thirst", that should do it.


Simple enough. It worked great. Thanks.


I have a new question now. I want to be able to ride a parrot, and be able to fly around while doing so. Through some experimentation, I have determined that it just isn't possible to fly the parrot in its normal state. I figured it would be possible to get this to work if I could change the parrot's behavior to "airplane". But I can't seem to find the instruction required to change the behavior of a unit. I also tried to replace the parrot with a different one (one which has the airplane behavior), but I failed at that too. Do you know how I can get this to work?

Thank you again for the help you've given.
To the start Previous 1 2 3 4 ... 121 122 Next To the start