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 294 95 96121 122 Next To the start

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
The Second has written
How can I create an info to there where the arrow hits?
I have tried:
1
2
3
4
5
6
7
8
9
10
on:impact {
  local $x,$z;
  $x=impact_x();
  $z=impact_z();
  $id=create("info",32,$x,$z);
  timer "info",$id,250,1,"new";
  freevar $x;
  freevar $z;
  freevar $id;
}
(This is in the arrow's definition)
But nothing happens when the arrow hits to the ground...

And what is "new" timer? You can use on:create for info.
Like that:
in info
1
2
3
on:create{
msg "info created";
}
It is for sure that info was created

old Re: Scripting Questions

lint35
User Off Offline

Quote
I don't know where else to put this question without making a new thread, what would be the best program to make a sky box image for stranded II? I tried using Terragan but the skies are off set. also what is the best program to make fonts for stranded II as well, thanks!

old Re: Scripting Questions

UnIdEnTiFiEd
User Off Offline

Quote
I have a Question. What is the script for the menu but instead of the same song constantly it does random? say i had a cool song and another cool song, how can it be scripted that it randomly plays any of those songs? (for menu)

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
UnIdEnTiFiEd has written
I have a Question. What is the script for the menu but instead of the same song constantly it does random? say i had a cool song and another cool song, how can it be scripted that it randomly plays any of those songs? (for menu)

It is in mod Gradira, but I can tell script not from it(i didn't look it there).
Rename your songs like "song1" and "song2" or "menu1","menu2", i mean make the same name, but numbers in the end. Now, the
1
2
3
4
on:start{
$rnd=random(1,2);
music "menu$rnd";
}
It is if you have menu1 and menu2 names.

old UUG

ab6100
User Off Offline

Quote
Hi, im kinda having troble with makeing a script for lives,

if its posable could someone help me with this...

so far i've turned the small cristal into a extra life (name)
set it to refill health,hunger,thurst,and tiredness.... on use, but i would like to know if its posable to make it work on death



please help

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
ab6100 has written
Hi, im kinda having troble with makeing a script for lives,

if its posable could someone help me with this...

so far i've turned the small cristal into a extra life (name)
set it to refill health,hunger,thurst,and tiredness.... on use, but i would like to know if its posable to make it work on death



please help

All the things you need is just one command, s2 cmd revive
if you want to revive player, write
1
revive 1;

old Camera in placement mode?

grouch
User Off Offline

Quote
Hi all,

n00b here. Can someone explain how to adjust camera position in placement mode? I've tried several approaches, nothing seems to have any effect. It's disconcerting to try and place a campfire from inside a group of palm leaves.

p.s. I've noticed you pro modders use links to commands on the Stranded II command reference pages. Unfortunately, the Unreal Forum search function ignores those. If I try to search the forum for those commands in posts, often nothing results. Any suggestions for a better way to search through 95 pages of posts to see if anyone has addressed a n00b's question on that command?

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
to adjust a camera position in the editor select the "Infos" -group and hold your mouse over the camera-info you want to adjust. then press space, now 4 little orbs will appear which are arranged in a way in which it looks like a corner. the one in the center is for changing the position of the camera-info, the other 3 ones are for turning the info on the X- Y- and Z- angles (hold left mouse button to move them). when done press space again.

about the links to special commands:
write "s2:" and after that tipe the command
e.g. "s2: msg" (without the space after the colon!) then it will look like "s2 cmd msg" (you don't even need the "" those are just to show you where it starts and ends)

for a full list of all commands see here

old Re: Scripting Questions

grouch
User Off Offline

Quote
Hurri04,

I appreciate that you took the time to answer, BUT...

You didn't understand my post. While playing the game, (NOT working in the editor), I want the building placement mode viewpoint to default to eye-level, not 100 (feet, meters, pixels, whatever the scale unit is). How can I script this? Using 'setplace "Text",camera height' in various ways has been fruitless for me. I'm missing something. Can I add a global event to game.inf? Do I have to use individual scripts in each object definition? Do they belong in building.inf or object_building.inf? Is there a way to move the viewpoint using scriptkeys? If DC is listening, can I hack 2 bytes in my personal copy of the stranded.exe to change the default height? Anybody?

About my 'p.s.', I DON'T want to know how to link to a Stranded II website command definition while writing a post. I want suggestions on how to get the Unreal Software Forum search engine to find references to those commands in posts.

Still, thank you, Hurri for responding.

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
grouch has written
[...] While playing the game, (NOT working in the editor), I want the building placement mode viewpoint to default to eye-level, not 100 (feet, meters, pixels, whatever the scale unit is). How can I script this? Using 'setplace "Text",camera height' in various ways has been fruitless for me. I'm missing something. Can I add a global event to game.inf? Do I have to use individual scripts in each object definition? Do they belong in building.inf or object_building.inf? Is there a way to move the viewpoint using scriptkeys? [...]

sorry, seems that I misunderstood your post...

but as I have tried to find a way to set individual building-offsets for each building on my own I can tell you that it doesn't work with the current version of Stranded II, and believe me, I tried a lot of tricks but either you get a crossparsing errror, the mode where you set the buildingplace doesn't even open or the script is just ignored so the camera switches too an offset of 100 again so it all doesn't work...

I told Mc Leaf about this problem because he is currently working on the source code and he said that it shouldn't be a big problem for him to create a new command or parameter which shall be able to do the job easily
grouch has written
About my 'p.s.', I DON'T want to know how to link to a Stranded II website command definition while writing a post. I want suggestions on how to get the Unreal Software Forum search engine to find references to those commands in posts. [...]

huh... never came across that problem by myself...
I always use the list of commands I linked in the post before but now I saw that most of the commands aren't translated into english... maybe you could try to work with it using a dictionary...?

old Re: Scripting Questions

grouch
User Off Offline

Quote
Hurri04 has written
sorry, seems that I misunderstood your post...


No need to apologize, now that we are on same frequency. Hard to believe there is no way to get at this. I know I can do a 'create "object"' script, but then I need to specify an object and a position relative to the player, unless I want it at my feet, and was trying to avoid doing individual scripts for many objects or an intelligent script to parse a list of objects for the one I want. I'm not yet that familiar with the scripting.

Well, if anyone out there has any insight on this, please offer it up. I GIVE YOU COOKIE!!

re: the forum search engine... I keep seeing some long term members denegrating newbies about not searching, but 2 examples. Search "n00b" ("n',"zero","zero","b") - you get 2 posts, neither of which is the one I asked this question in. Search "buildingplace", which you just used in your reply - no results. It's just as bad with script commands; I know from scanning through all 95 pages of the scripting thread, that there is a wealth of code snippets for useful stuff. I've started to copy & paste those out to a text file, but its tedious. I will remember seeing something, but can't find it and the search isn't a great deal of help. Not your fault, not looking to rant, just looking for a better way to find things.

Anyway, thx Hurri.

old Re: Scripting Questions

slow
User Off Offline

Quote
"Invalid ITEM ID for COMBINATION (107)" haunts me I did a forum search and found a post with same problem, only a different number in the error code, and it was suggested to search through combinations.info to ensure that unused item IDs were used if you have edited it.

I modded several things in the last day but I did search through it endlessly and the IDs are correct. :-S I used the number of the item it is used to create as the combination ID as it appeared all the natural combinations have done. So, I've no idea what it can be. :-S

Does anyone have any suggestions?

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
I recently had this problem with a mod I tried recently. It's not in the combinations.inf file, it's in the item file. Find item ID 107 and have a look to see if the item defined before it in the same file is missing a "script=end" tag. If it is, add the missing tag.

E.g. Change:
1
2
3
4
5
6
...
script=start

### New Item
id=107
...
to
1
2
3
4
5
6
7
...
script=start
script=end

### New Item
id=107
...

My mod viewer should pick up and report about this.
edited 1×, last 14.04.10 02:02:22 am

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
I could be the item ID is messed up or changed, messing up the combo. Check with reference to the original S2.
Edit: Damn, you beat me by a couple seconds.

old Re: Scripting Questions

slow
User Off Offline

Quote
Psytechnic has written
I recently had this problem with a mod I tried recently. It's not in the combinations.inf file, it's in the item file. Find item ID 107 and have a look to see if the item defined before it in the same file is missing a "script=end" tag. If it is, add the missing tag.

E.g. Change:
1
2
3
4
5
6
...
script=start

### New Item
id=107
...
to
1
2
3
4
5
6
7
...
script=start
script=end

### New Item
id=107
...

My mod viewer should pick up and report about this.


Bloodshot has written
I could be the item ID is messed up or changed, messing up the combo. Check with reference to the original S2.
Edit: Damn, you beat me by a couple seconds.


You guys are fast The mod viewer did find it. It was something so silly, too. I had indented the script end tag, which somehow convinced it that it didn't exist.

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
slow has written
You guys are fast The mod viewer did find it. It was something so silly, too. I had indented the script end tag, which somehow convinced it that it didn't exist.


My mod viewer found this? Excellent! That was an unintended consequence of my programming but I know why that happened. Much like the game, my mod viewer expects all definitions outside of scripts to be completely left aligned. Thanks for telling me this. Now I know it's something I shouldn't change.
To the start Previous 1 294 95 96121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview