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 237 38 39121 122 Nächste Zum Anfang

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
see game.inf and the on:useground event...

i tried... that does not work...
i even tried to copy the grain one and changed to bamboo and the id detailss still dosent work
edit:another question: im trying to make an herb (item) in a form of an bang fungus (object) and this is the code:

### Orange herb
id=133
name=Orange herb
group=food
icon=gfx/bangfungus.bmp
model=gfx/bangfungus.b3d
scale=0.6
mat=leaf
weight=200
info=an orange herb.
script=start
on:eat {
process "eating",1000;
eat 10,10,2,0;
}
script=end
y it dosent work?
2nd edit:its even dont show up on items menu...
2× editiert, zuletzt 21.08.08 14:16:21

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
Ok, make sure you've put it to some of the items_***.inf files

About planting bamboo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if ($item==8){
				if ($y>0){
					if (freespace($x,$y,$z,20,1,0,0,0)){
						freestored "unit",1,8,1;
						$id=create("object",120,$x,$z);
						event "plant","object",$id;
						if (skillvalue("plant")>=400){
							process "planting bamboo",500;
						}else{
							process "planting bamboo",2000;
						}
						play "dig.wav";
						play "mat_leaf1.wav";
						event "iskill_plant","global";
					}else{
						speech "negative";
						msg "Here is not enough space!",3;
					}
				}else{
					speech "negative";
					msg "Bamboo does not grow in water!",3;
				}
But what you've forgotten is to put in bamboo object scripts (object_stuff.inf) this
1
2
3
on:plant {
		spawntimer "self",-4;
	}

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
Ok, make sure you've put it to some of the items_***.inf files

About planting bamboo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if ($item==8){
				if ($y>0){
					if (freespace($x,$y,$z,20,1,0,0,0)){
						freestored "unit",1,8,1;
						$id=create("object",120,$x,$z);
						event "plant","object",$id;
						if (skillvalue("plant")>=400){
							process "planting bamboo",500;
						}else{
							process "planting bamboo",2000;
						}
						play "dig.wav";
						play "mat_leaf1.wav";
						event "iskill_plant","global";
					}else{
						speech "negative";
						msg "Here is not enough space!",3;
					}
				}else{
					speech "negative";
					msg "Bamboo does not grow in water!",3;
				}
But what you've forgotten is to put in bamboo object scripts (object_stuff.inf) this
1
2
3
on:plant {
		spawntimer "self",-4;
	}

i tried to put it in the proper info files but still dosent work (about the herb)
about the bamboo script-its not working.
i did what u say but it says:
"on must be not subcordinated (or somethin like that) to object (i think this was the text).
so i dont think u can make it plantable

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
Oh! I forgot about the last }
Put it at the end of
the if ($item==8){ script

nvm forget about planting bamboo i will add it to the building menu instead of planting it
and about the herb :whats wrong with the code?
EDIT:the herb in the start of the page with the code

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
I have no idea. Where exactly did u put it in?

i said forget about the bamboo i added it to the buildings list now but what is wrong with the herb code

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
and I said I have no idea. Where exactly did u put it in?
And I WAS talking about your herb
Zitat
the herb in the start of the page with the code

But what file...?

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
and I said I have no idea. Where exactly did u put it in?
And I WAS talking about your herb
Zitat
the herb in the start of the page with the code

But what file...?

oh i put it in items.inf and items_edible inf.
something wrong with maybe the code?

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
you know what? Send me this file (items_eadible.inf) to my ICQ or mail, or upload it somewhere and I'll take a look. Cause this is unacceptable

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
you know what? Send me this file (items_eadible.inf) to my ICQ or mail, or upload it somewhere and I'll take a look. Cause this is unacceptable

whats ur email?

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
You can see it in my profile. But better please upload it.. For example here www.dump.ro or whereever else you want

ok,il upload it to this site (the site u written)
EDIT:i canoot upload it to there,dont know y...
do u want i post the whole items list to here ? (including the herb )

alt Re: Scripting Questions

DontKnowToScript
User Off Offline

Zitieren
HudaJan hat geschrieben
Yes. As I thought... Your previous item (salt) misses script=end definition

oh. thx so much
EDIT:zomg im trying to create a new herb (i know u get bored of this) butit dosent seem to work.
all these are ok: semi colons,{ and }'s,script=end and start,whats wrong?
heres the code:

### white herb
id=134
name=white herb
group=food
icon=gfx/cottonplant.bmp
model=gfx/cottonplant.b3d
scale=0.6
mat=leaf
weight=200
info=a white herb.
script=start
on:eat {
process "eating",1000;
eat 10,10,2,0;
}
script=end
2× editiert, zuletzt 22.08.08 19:11:42

alt Re: Scripting Questions

Raven Shadow
User Off Offline

Zitieren
Is there a way to have a window/custom gui open and
have the game unpaused, so the player can interact
with an object via the window in real time?

alt Re: Scripting Questions

HudaJan
Super User Off Offline

Zitieren
I'm not sure if I understan you right, but if yes, you could use s2 cmd image
Make the image (pink color r 255, g 0, b 255) is showed as transparent...
Zum Anfang Vorherige 1 237 38 39121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht