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 25 6 7121 122 Next To the start

old Re: Scripting Questions

Mc Leaf
Super User Off Offline

Quote
Satis has written
I know that it have not been translated, but I understand some german sinc I hade 1 year in 7. grade but that's a long time ago, so I realy dont remember so mutch of it anymore :S

kind regards
Satis

At least the google-languagetool may help sometimes...

old Re: Scripting Questions

Satis
User Off Offline

Quote
Mc Leaf has written
Satis has written
I know that it have not been translated, but I understand some german sinc I hade 1 year in 7. grade but that's a long time ago, so I realy dont remember so mutch of it anymore :S

kind regards
Satis

At least the google-languagetool may help sometimes...

hehe okay

I stille would like to know how the probability is function in this script:
1
find=Item type, probability, max, min, necessary Item

Anyone ?!?

Kind regards
Satis

old Re: Scripting Questions

Mc Leaf
Super User Off Offline

Quote
Flying Lizard has written
for example, if you set it to 10 and hit the object 100 times, you'll get 10 times the desired item.

that's just the theory... Sometimes it doesn't work correct, or I don't understand this stuff correct...

old Re: Scripting Questions

Mc Leaf
Super User Off Offline

Quote
Flying Lizard has written
well, theres the parameter find_ratio too

Yes, another silly useless object-definition... A little bit after assistance in mathematics (especially statistics) for DC (and english for me) would be helpful, I guess...

old Re: Scripting Questions

Satis
User Off Offline

Quote
Flying Lizard has written
for example, if you set it to 10 and hit the object 100 times, you'll get 10 times the desired item.

okay lets see if I get this corect.

I make a rock that have the: find=23,10,1,1
witch is a stone.

If I go and hit that rock 100 times and then go inside my bag, then there skould only be 10.... right ?

if so, then can you tell me why I ended up with having 33 stones in my backback ??

Info: I tryed using findratio=100 and that only did so I found 1 stone each time I hit the rock:S

just wondering

-------------------------------
Another thing!

Can you alter the colormap inside the game ??

problem is that I would realy like to change in the colormap when I f.eks dig a hole and there will be a littel brown spot where I have diged or when I blow somthing up with a dynamith there will be a blask mark on the ground

if there is a command for this, can you please tell me the code statement as well lige
1
altercolormap x,y,z,penrarius,red,green,blue;

Kind regards
Satis

old Re: Scripting Questions

Mc Leaf
Super User Off Offline

Quote
Satis has written
Flying Lizard has written
for example, if you set it to 10 and hit the object 100 times, you'll get 10 times the desired item.

okay lets see if I get this corect.

I make a rock that have the: find=23,10,1,1
witch is a stone.

If I go and hit that rock 100 times and then go inside my bag, then there skould only be 10.... right ?

As I said: that's the theory...

Satis has written
if so, then can you tell me why I ended up with having 33 stones in my backback ??

...and that is the practice.

Satis has written
just wondering

Me too.

Satis has written
Can you alter the colormap inside the game ??

Yes! That would be too nice... But unfortunately not.

old Re: Scripting Questions

Satis
User Off Offline

Quote
okay thanks

but you know I'll be back

EDIT

And what did you know, I'm back with a new question

I know ther is a dig_area info point that will come true if you dig inside that area radius.

Now that I have prospecting in my mod from the Massive Mod by Builder2.0 I actualy want to make an area trigger function that is realy easy to use instead making a script each time I make a dig_area.

I have been looking inside the infos.inf file just to see what code there is inside there but I can't find any related infoes on the diferent info ID. is that somthing that is implementet in the core program ??
edited 1×, last 27.09.07 08:54:00 pm

old Re: Scripting Questions

Satis
User Off Offline

Quote
Flying Lizard has written
yep, that's hardcoded. althoug THIS would have been really easy to script.

hmmm okay :S
well I might just have to script it into the shovel script then...

If I had to make an area trigger and coded it into the script inside the game I would have to write aboud 30-50 line each time I placed a tricker for the prospecting zone :S

well neverming then

(pating my self: cherup just go back to the work >D )

Kind regards
Satis

old Re: Scripting Questions

Satis
User Off Offline

Quote
Okay new Question.

I'm now looking for a code that will do this stuff:

When I have build a Mining Building to help me in the mining stuf, I want to make an check in the impact script on the pickaxe to see if the mining house is in range. if it is, then set the outcome of the find mineral higher.

I have tryed the command inrange and count_inrange.

here is a code snip of what I have tryed:
1
2
3
4
5
if (inrange "object",4998,200){
  msg "get more stuff",!1,3000;
}else{
  msg "get no bonus",!1,3000;
}

what am I doing wrong ??

Kind regards
Satis

old Re: Scripting Questions

bizzl
User Off Offline

Quote
You have forgotten the brackets. All commands that returns something need their parameters in those:
1
inrange[b]([/b]"object",4998,200[b])[/b];
It's also better to add ==1 behind the function, since S2S doesn't always evaluate a returned 1 as true.
1
2
3
4
5
if (inrange[b]([/b]"object",4998,200[b])==1[/b]){
msg "get more stuff",!1,3000;
}else{
msg "get no bonus",!1,3000;
}

old Re: Scripting Questions

Satis
User Off Offline

Quote
Thanks bizzl!

g1real has written
Q: Is it possible to implement land vehicles in stranded II?


I would say yes, sinve if you have tamed a raptor you actualy can ride it.
How it's done I cant say sorry :S

EDIT:
I have just tryed that bizzl and eaven if I set the range up to 2000, it still only gives me the message: get no bonus.


EDIT: Again
Just tryed the count_inrange Instead and set the parameter to greate than 0.
and guess what it worked

kind regard
Satis
edited 2×, last 28.09.07 07:44:25 pm

old Re: Scripting Questions

bizzl
User Off Offline

Quote
Yeah, sry forgot to tell that s2 cmd inrange is used for checking if there's a particular object in range Shit happens.

About the Land vehicles: yes, ist possible.
Just add the following line to the definition (not the Script or description!) of your wagon, cart, whatever:
1
behaviour=vehicle

old Re: Scripting Questions

g1real
User Off Offline

Quote
That was so obvious I didn't think it'd be worth trying, thanks tho.



Fuck, I'm getting addicted to WoW, HELP.


Give me a load of gold right now, so I can buy stuff to keep me off it! Quick!

old Re: Scripting Questions

Satis
User Off Offline

Quote
In the buildings.inf there is a command called: buildspace.

Now now, I know how that one is function.
I know of these commands to feed it:
•at object - at object is feeded with: atobject=ID
•water

is thare a command to build it near an object and not on the object ??
edited 1×, last 29.09.07 03:38:45 pm

old Re: Scripting Questions

bizzl
User Off Offline

Quote
nope, at least not hardcoded.
But you can try the following script (in the building I think):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
on:build_start {
	local $id,$x,$z;
	$x=selectplace_x();
	$z=selectplace_z();
	$id=create("info",30,$x,$z);
	if (count_inrange("object",9999,50,"info",$id)==0) {
		msg "I can't build this here.",3;
		msg "It needs to be near a 9999.",3;
		speech "negative";
		skipevent;
	}
	free "info",$id;
	freevar $id,$x,$z;
}
I'm not sure if selectplace_x() and selectplace_z() are set by the hardcoded building setup, but I think so

old Re: Scripting Questions

Satis
User Off Offline

Quote
okay thanks bizzl I actualy don't know it I'll test it, but who knows


EDIT

I have just made an text model with a spinning animation in it.
It's just a object so I was planing to make it an building, but no matter what I do, I cant get it to spinn ingame.

here is the script I used:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
### Satis Developing
id=4997
name=Satis Developing
group=building
icon=gfx\desk.bmp
model=gfx\gfx_anw\Satis_dev.b3d
health=100
mat=wood
col=3
script=start
     on:start {
       animate currentid(),2,6,2,1;
     }
     on:load {
       animate currentid(),2,6,2,1;
     }
script=end

What am I doing wrong, and is it posible to animate buildings ??

EDIT

Can someone please give me an answere
edited 2×, last 05.10.07 11:36:10 am
To the start Previous 1 25 6 7121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview