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 212 13 14121 122 Next To the start

old Re: Scripting Questions

Guest

Quote
And since the person before me only asked three questions, I'm guessing 4. was directed at me, no?
And I'm guessing the was because you told me that it was possible, but not how, correct?
Well, it's OK, you see. I actually prefer not knowing how, because, as long as I know it's possible, I like to figure it out on my own.
So... thanks!

old Re: Scripting Questions

Flying Lizard
User Off Offline

Quote
@Gradir
in you're script are some failures,
•you forgot the { behind on:start
•not a failure but it makes the whole thing easyer to ready, try writing like this

if (bluber) {
stuff 1
stuff 2
}

•you forgot to close the brackets of create

beside that you're script should work, I'm not sure if it provides all functions you wanted it to have, since I didn't understood you completeatly


The thing with rotating is quiet easy, just put a script with the event on:create in the item's definition, where it get's randomly rotated.


@Storm
The Problem is, I don't know if you can anything else in scripting, so I think this may be a bit to tough for you. (at the moment)

Anyway, in ASoS and Lost in Space (modifications) there are other bars implemented, so it clearly IS possible.

old Re: Scripting Questions

Guest

Quote
Well, I;m pretty good at scripting... I'm not sure if I'll be able to do this, when you put it that way, but I'll give it a shot.
So far, I'm guessing you have to change "healthsystem" in game.inf to, like, 5, no? I haven't checked out how to implement the bar itself lately (got sidetracked), but I'm about to...

And... I'm not entirely sure why I'm even saying this, since this post clearly has no value whatever

old Re: Scripting Questions

Guest

Quote
A few questions now:

The .b3d files are 3d models, no? What programs can save as .b3d, if they are?

Moreover, is it possible to call an event in a script? Like, say I wanted to make the day change as part of a script. Could I do that? If so, how?

Thanks in advance!

old Re: Scripting Questions

Brandon
User Off Offline

Quote
I am using milkshape and it makes .b3d files open to 3d.

But it is not free so you should use demo.

old Re: Scripting Questions

Gradir
User Off Offline

Quote
Thank ye very much, Flying Lizard!

I've managed to make it

But I also have some new questions!
1) Is there a way to prevent items that were supposed to spawn at beach, from spawning inland, when there is a lake inside an island? (talking about random maps)
I've also tried to copy the script that deletes sharks and piranhas near player on start, but I think it doesn't work at all. Help!
2) Is there a way to make the items spawn near others (in groups) on random maps?

About the models and format, I advise you to use Blender (www.blender.org)
It's an incredible application, and it's completely FREE.
Plus, here is a .b3d exporter for it:
http://gandaldf.altervista.org/b3dexporter.htm

Howgh

edit:

About S2Ext:
I've found a bug with the frying pan, there is something messed up, anyone experiencing the same problems?
edited 1×, last 02.02.08 12:14:03 pm

old Re: Scripting Questions

Guest

Quote
Thank you- I downloaded Blender, and I like it very much...

But what about my other question? Is it possible to fire one of the game's events (such as, in my example, changeday) and have it happen just as though the game had fired it?

old Re: Scripting Questions

DC
Admin Off Offline

Quote
@Storm:
you could do it this way:
1
sethour 23; setminute 59;
this will change the day within the next seconds. you could also add the "sleep"-command.

if you just want to execute all the on:changeday scripts you can use the "event"-command:
1
event "changeday","global";
however this will NOT change the day at all. it will just execute the scripts.


there is no special command for changing the day.

old Re: Scripting Questions

Guest

Quote
Thank you!
That is exactly what I needed.
I just needed something to make the changeday events occur during a timer script.
So... thanks!

old Re: Scripting Questions

Guest

Quote
What do you mean by "log"?

My guess:
Do you mean a reference of all the commands?
There is one, but it's in german...

old Re: Scripting Questions

Gradir
User Off Offline

Quote
no, a file where I can find all the events from the console (and probably more) so I can know where is a problem, when he's giving me an error on loading the game (launching the game with debug mode doesn't help)

By the way, how can I prevent items from spawning inside the terrain when there are lakes or any water inland, when I want them only to spawn at the beach? I mean, in random maps, there must be some way, because I don't see sea shells and stuff in the 'marches-type-random-map' in the inland lakes?

old Re: Scripting Questions

DC
Admin Off Offline

Quote
use randomcreate "Class", Type [, Y Min, Y Max] [, Ammount]

It will create an object (ammout param. is only for items) at a random position with a terrain height between Y Min and Y Max.

sealevel is at Y = 0
Y > 0 is land
and Y < 0 is under water

e.g. shells are created at Y 0 to 30

old Re: Scripting Questions

Guest

Quote
Hi all. Sontimes i shoot a poison arrow into my buildings, and poisons them. So for the heck of it decided to make a "cure arrow" my first new item. I compared it to the pfiel, or arrow right next to it while scripting. I tested it and when i went to make it (with cloth,heal potion, stick, and feather) it went to Memory Acsess Violation. Before it crashed, i saw that the icon was blank. I then tried it again and this time went to "cheat" and give item. I found my Cure_arrow, and the icon was still blank. Can someone please help, i'm a newb scripter

old Re: Scripting Questions

Guest

Quote
I used the model for the fire arrow. Saved these in the comb. ammo file and the items weopons file.


### Cure_Arrow
id=999
name= Curing Arrow
group=ammo
icon=gfx\Arrow_cure.bmp
model=gfx\arrow_fire.b3d
fx=16
behaviour=ammo:59,ammo:60,ammo:61
weaponstate=16
scale=0.5
mat=wood
weight=10
info=An arrow with healing potion soaked on cloth, cures the target.
damage=0
healthchange=0
script=start
on:impact {
          if (impact_first()==1){
               if (skillvalue("hunt")>=100){
                    if (random(1,10)<=8){
                         $tmp=create("item",53);
                         setpos "item",$tmp,impact_x(),impact_y(),impact_z();
                         setrot "item",$tmp,0,getyaw("unit",1),0;
                    }
               }
          }
     }
script=end



###cure arrows (branch+feather+cotten\wool+healthpotion)
combi=start
id=arrow_cure
req=24
req=57
req=48
req=36
gen=999
script=start
     play "mat_leaf2.wav";
     process "making arrow",2500;
script=end
combi=end

old Re: Scripting Questions

DC
Admin Off Offline

Quote
icon=gfx\Arrow_cure.bmp
did you create the Arrow_cure.bmp? It might lead to a crash if this file does not exist.

old Re: Scripting Questions

Guest

Quote
Yeah, although the real link is "C:\program20%files\unrealsoftware\StrandedII20%MODS\mods\strandedII\gfx\arrow_cure.bmp" is it case sensitive? (btw 20%'s are spaces) I also used the fire arrow modle cause i don't have b3d

old Re: Scripting Questions

bizzl
User Off Offline

Quote
Bloodshot has written
Yeah, although the real link is "C:\program20%files\unrealsoftware\ StrandedII20%MODS\mods\strandedII\gfx\arrow_cure.bmp" is it case sensitive?

Nope, since Windows is never case sensitive
However, it could be possible that there are blanks in the definition right behind the path, and that could lead to trouble in S2.
Or you used the wrong mod directory, if I remember right there was a Space in mods/Stranded II/ IMG:https://bizzl.bi.funpic.de/forum/images/smilies/RedFox/huh.gif

old Re: Scripting Questions

DC
Admin Off Offline

Quote
you really should just enter the relative path to the file like it's done with all the paths in the inf files. however something with the path (or the image) must be wrong. otherwise it would work.
To the start Previous 1 212 13 14121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview