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 291 92 93121 122 Next To the start

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
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

old Re: Scripting Questions

Lion_Hearted
User Off Offline

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

old Re: Scripting Questions

lint35
User Off Offline

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

old Re: Scripting Questions

Hulk_Brogan
User Off Offline

Quote
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

old Re: Scripting Questions

Hulk_Brogan
User Off Offline

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

old Re: Scripting Questions

Lion_Hearted
User Off Offline

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

old Re: Scripting Questions

Kayren
User Off Offline

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

old Re: Scripting Questions

Lion_Hearted
User Off Offline

Quote
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...
edited 1×, last 08.03.10 10:48:21 am

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
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".
edited 1×, last 08.03.10 08:10:49 pm

old Re: Scripting Questions

Lion_Hearted
User Off Offline

Quote
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...
edited 1×, last 08.03.10 02:47:29 pm

old Endless Gamemode

tmh47
User Off Offline

Quote
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

old Re: Scripting Questions

Spicy Night Owl
User Off Offline

Quote
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

old Re: Scripting Questions

tmh47
User Off Offline

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