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 25 6 7121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
Satis hat geschrieben
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...

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
Mc Leaf hat geschrieben
Satis hat geschrieben
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

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
Flying Lizard hat geschrieben
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...

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
Flying Lizard hat geschrieben
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...

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
Flying Lizard hat geschrieben
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

alt Re: Scripting Questions

Mc Leaf
Super User Off Offline

Zitieren
Satis hat geschrieben
Flying Lizard hat geschrieben
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 hat geschrieben
if so, then can you tell me why I ended up with having 33 stones in my backback ??

...and that is the practice.

Satis hat geschrieben
just wondering

Me too.

Satis hat geschrieben
Can you alter the colormap inside the game ??

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

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
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 ??
1× editiert, zuletzt 27.09.07 20:54:00

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
Flying Lizard hat geschrieben
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

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
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

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
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;
}

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
Thanks bizzl!

g1real hat geschrieben
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
2× editiert, zuletzt 28.09.07 19:44:25

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
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

alt Re: Scripting Questions

g1real
User Off Offline

Zitieren
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!

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
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 ??
1× editiert, zuletzt 29.09.07 15:38:45

alt Re: Scripting Questions

bizzl
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Satis
User Off Offline

Zitieren
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
2× editiert, zuletzt 05.10.07 11:36:10
Zum Anfang Vorherige 1 25 6 7121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht