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 237 38 39121 122 Next To the start

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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...
edited 2×, last 21.08.08 02:16:21 pm

old Re: Scripting Questions

HudaJan
Super User Off Offline

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

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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

old Re: Scripting Questions

HudaJan
Super User Off Offline

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

But what file...?

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
and I said I have no idea. Where exactly did u put it in?
And I WAS talking about your herb
Quote
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?

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
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

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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?

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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 )

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
HudaJan has written
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
edited 2×, last 22.08.08 07:11:42 pm

old Re: Scripting Questions

Raven Shadow
User Off Offline

Quote
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?

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
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...
To the start Previous 1 237 38 39121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview