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 254 55 56121 122 Next To the start

old Re: Scripting Questions

Cryp18Struct
User Off Offline

Quote
@ryandeanrocks
s2 cmd menu returns in which "state" the game is/which menu is open:

0 - normal game ( no menu open )

1 - character page/menu
2 - inventory
3 - diary/journal

20 - the list of buildings ( where you can choose what you want to build )
21 - messagebox (msg)
23 - exchange with animals/ buildings
24 - map
25 - cracklock
26 - dialogue

100 - sequence (seqstart)
300 - top-view in which you can choose where your building should be built
301 - (selectplace)

So you can check what the player is currently doing/looking at.

1
2
3
4
if (menu()==0){ // if no menu is open
	// do something ...
	// ...
}

@Bloodshot
please specify the problem.
What is not working ?

old Re: Scripting Questions

CoreyRDean
User Off Offline

Quote
Cryp18Struct has written
@ryandeanrocks
s2 cmd menu returns in which "state" the game is/which menu is open:

0 - normal game ( no menu open )

1 - character page/menu
2 - inventory
3 - diary/journal

20 - the list of buildings ( where you can choose what you want to build )
21 - messagebox (msg)
23 - exchange with animals/ buildings
24 - map
25 - cracklock
26 - dialogue

100 - sequence (seqstart)
300 - top-view in which you can choose where your building should be built
301 - (selectplace)

So you can check what the player is currently doing/looking at.

1
2
3
4
if (menu()==0){ // if no menu is open
	// do something ...
	// ...
}

@Bloodshot
please specify the problem.
What is not working ?



There isn't really a problem I just needed to know if I could take that peice of code out of the script I see now I can to a point thanks for your answer

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
The timer dosn't work. Left Click or use to change types dosn't work. Bracket missing don't know where or if there even is one missing. Sure damage dosn't work (though not positive.)

old Re: Scripting Questions

Apostle
User Off Offline

Quote
darksol has written
if you add the
          event "iskill_cook","global"
to things like making bread and baking cookies then that would be good or you can not get the cooking skill to go up in the first place to unlock the wine and juice


I already have those lines added to making bread and baking cookies.

This is my skill info on cooking.

!1Cooking
This skill increases whenever I cook something

!1150 - Juicer
You are now able to squeeze the juice from berries.

!1250 - Wine Maker
A better understanding of cooking allows you to be able to ferment grapes into wine.

!1300 - Cook
You better understand the skill of cooking and can now bake bread.

!1450 - Baker
Your cooking skills have improved and you are now able to bake cookies.


I would like it so making juice and wine relied on some skill, as it adds a bit more role play. I don't really want to remove it, but if nobody can help me resolve this problem I may have to.
edited 1×, last 16.11.08 11:39:04 am

old Re: Scripting Questions

Gradir
User Off Offline

Quote
Ok, never mind
How about another problem:
How to make fishing possible on random islands?
As far as I know its only possible at fishing areas (info)

old Re: Scripting Questions

garfield751
User Off Offline

Quote
auctally its possable to fish at non fishing spots but you need to have a high enough level and bait. as for makeing fishing areas on random islands i dont know

old Re: Scripting Questions

DontKnowToScript
User Off Offline

Quote
maybe
1
2
3
4
5
6
randomcreate(...);
or:
$id=randomcreate ("info",fishing area id,...);
$id2=create ("item",fish id,0,0);
setamount $id2,1000;
store $id2,$id;
edited 1×, last 18.11.08 12:15:38 pm

old Re: Scripting Questions

Cryp18Struct
User Off Offline

Quote
@Bloodshot
Timer:
You can not use timers with items the player carries in the inventory. Start the timer with the player as target, similar to cease_healthpotion and release_excrement ( have a look at the players script ).

Damage:
Dont use quotation marks:

1
2
:notok:damage "$tmp",$tmp2,5;
:ok:damage $tmp,$tmp2,5;

old Video Feed

CoreyRDean
User Off Offline

Quote
Is there any way to put in code so that it game will play a video? Like say I want to put in intro credits in a cool form over a trailer that I made of the game instead of putting a sequence is there anyway to do that?

old Re: Scripting Questions

HudaJan
Super User Off Offline

Quote
DontKnowToScript has written
can someone post an exaple of a projectile script?

look at the kidnap mod .s2s files, this script was my favorite

old moddleing questions

darksol
User Off Offline

Quote
i am making a plant and i a m wondering what color is the to set to the back ground to make only the plant show and not the plant and the back ground

old Re: Scripting Questions

DC
Admin Off Offline

Quote
Stranded II uses textur flags. you have to add special strings to the FILENAME of a texture to make transparent stuff.
I suggest to use png with alphachannel for plant textures. just add an "_a" to the filename for example "plantstuff_a.png" to make the alpha stuff work in Stranded II.

old Re: Scripting Questions

CoreyRDean
User Off Offline

Quote
okay well in the S2EXT mod the water is kinda see through it can some one tell me where in the s2ext mod I can find that code or whatever I need to find in order to put that in my mod?
edited 1×, last 21.11.08 03:58:05 am

old Re: Scripting Questions

The mad man
User Off Offline

Quote
I've been looking for the tame monkeys script that makes them go and do things does anybody know the file or can anybody tell me how i would make another animal do somthing if i tame it
thanks
To the start Previous 1 254 55 56121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview