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 291 92 93121 122 Nächste Zum Anfang

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
1.Make cameras. Change its pitch and yaw by pressing [space]. Blue line helps you to see, where is camera looking.
2.In script: s2 cmd seqstart , s2 cmd cammode , s2 cmd seqtimemode (in my menu map is 1000,1).
3. s2 cmd setcam - instantly sets camera position to info ID.
s2 cmd movecam - goes to info ID not instantly - in time
s2 cmd seqfade - If you like, it is just making screen black in some time, like in normal menu map.
REMEMBER: Time parameter is always counting from SEQSTART

alt Re: Scripting Questions

Lion_Hearted
User Off Offline

Zitieren
My turn to ask for help... Its not scripting help though...


I'm trying to make a carrot... but, I need the color that stranded 2 accepts as the environment's color...


In other words, I need the color that will be transparent in the game. I know pink is the menu color, but what is the ingame color for transparency.

alt Re: Scripting Questions

lint35
User Off Offline

Zitieren
Stranded II uses .png you can download a free program called Gimp, just Google it. You can see in the gfx folder that grass and other stuff use .png for example gras01_a.png the "a" stands for alpha making it transparent in game. Correct me if I am wrong but this is what I know. Use the .png file as a skin in your model if this is what you are asking to make it transparent.

alt Re: Scripting Questions

Hulk_Brogan
User Off Offline

Zitieren
Was wondering if anyone knows how to make NPC's aggressive like Watch Towers and Natives, so if i get too close they will attack

alt Re: Scripting Questions

Hulk_Brogan
User Off Offline

Zitieren
Vibhor hat geschrieben
Change their behavior to raptor


How do you do that? i tried Clicking on it, but it just lets me add items, de buffs/buffs or Scripts

alt Re: Scripting Questions

Lion_Hearted
User Off Offline

Zitieren
I need some help... You see this script here...


     //Molding
     on:use {
          if (count_self>15){
          play "molding.mp3";
               process "molding",10000;
               alteritem 15,504;
                    }elseif{
                         speech "negative";
                         msg "You don't have enough pieces of biomaterial",3;
          }
     }

Its defective... Now, what I want it to do, is to make SURE that there is 15 of item 503 before trying to make item 504...

Please help...

alt Re: Scripting Questions

Kayren
User Off Offline

Zitieren
Well, I don't remind that there was a count_self command. Try with the s2 cmd playergotitem command.
That would look like this:
1
2
3
4
5
6
7
8
9
10
11
//Molding
on:use {
	if (playergotitem()>15){
		play "molding.mp3";
		process "molding",10000;
		alteritem 15,504;
	}elseif{
		speech "negative";
		msg "You don't have enough pieces of biomaterial",3;
	}
}
Have fun.

alt Re: Scripting Questions

Lion_Hearted
User Off Offline

Zitieren
it looks right... but it says its needs another {


Edit: Don't worry I fixed it, it doesn't give a message, but it doesn't waste your time either...
1× editiert, zuletzt 08.03.10 10:48:21

alt Re: Scripting Questions

Psytechnic
User Off Offline

Zitieren
Kayren has the correct script except one major detail.

1
2
3
If (playergotitem([b]503[/b])>15){
...
}

the s2 cmd playergotitem returns an amount for the given id and that is the value you compare against "> 15".
1× editiert, zuletzt 08.03.10 20:10:49

alt Re: Scripting Questions

Lion_Hearted
User Off Offline

Zitieren
Edit,

I fixed it, you don't put the command elseif you put the command else, not elseif,

else if is only for things that continue on the same trajectory but a totally diffrent process, like a stick of wood, if there is fire nearby then make it into a torch, if there is no fire nearby but there is water then else if make it into a bendable branch.

Edit again

By the way, I completely agree with Psytechnic, the last part of your signature Kayren is completely... inappropriate...
1× editiert, zuletzt 08.03.10 14:47:29

alt Endless Gamemode

tmh47
User Off Offline

Zitieren
Hey, I'm working on a new gamemode (for my own entertainment, though)

I want it to force a Hemp Grandpa to spawn, but it says that it is expecting semicolon in the last line.

1
2
if (count("object",134)==0){ randomcreate "object",134,1,500;} // This line works, and forces hemp to spawn.
		if (count("unit",38)==0){ randomcreate "unit",38,1,10000000;} // This is the line it can't figure out

alt Re: Scripting Questions

Spicy Night Owl
User Off Offline

Zitieren
When i try to play my mod it says invalid item id for combination (186).
This is the combi code
1
2
3
4
5
6
7
8
9
10
11
12
### Light Flour (3xGrain + Stone)
combi=start
id=lightflour
req=42,3
req=23,1,stay
gen=186
script=start
	play "grind.wav";
	process "grinding",410;
                 event "iskill_cooking","global";
script=end
combi=end

This is the item code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
### Light Flour
id=186
name=Light Flour
group=food
icon=gfx\flour.bmp
model=gfx\flour.b3d
scale=0.65
mat=dust
weight=250
info=a pile of light flour. I can mix it with water to get light dough
script=start
	on:use {
		if ( ((count_behaviourinrange("object","fountain",50)+count_behaviourinrange("object","watersource",50))>0) or (inarea_freshwater("unit",1)==1) ){
			play "mat_flesh5.wav";
			alteritem 1,187;
			process "making dough",500;
                                                    event "iskill_cooking","global";
		}else{
			msg "I need water!",3;
			speech "negative";
		}
	}
	on:eat {
		process "eating",1000;
		eat 1,10,5,0;
	}
script=end

alt Re: Scripting Questions

tmh47
User Off Offline

Zitieren
Zitat
When i try to play my mod it says invalid item id for combination (186).
This is the combi code


I've been reading the first 18 or so pages of this thread, and I've seen someone have a similar problem.

Have you checked if the above item is correctly ended?

Last time I saw a like issue it was missing a "script=end" on the item above.
Zum Anfang Vorherige 1 291 92 93121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht