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 284 85 86121 122 Next To the start

old Re: Scripting Questions

filfer
User Off Offline

Quote
Castero66 has written
Umm how did u do?

diff types of wands (some cast fire magic and some are used for summoning) diff types of books (book of meteor, book of blizzard) or on:attack2 of bows for archery magic

old Re: Scripting Questions

Gordon_W
User Off Offline

Quote
hi everyone I got some questions about making a map:

1.Is it possible to rotate the objects vertically?cookie

2.How to spawn unit and item immediately by a trigger?
edited 1×, last 14.01.10 12:24:26 pm

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
Gordon_W has written
hi everyone I got some questions about making a map:

1.Is it possible to rotate the objects vertically?cookie


It certainly is. Now, do you mean via script or in the actual editor?

Gordon_W has written
2.How to spawn unit and item immediately by a trigger?


Are you triggering something just in one map? you could use on:loadmap

old Re: Scripting Questions

Gordon_W
User Off Offline

Quote
Psytechnic has written
Gordon_W has written
hi everyone I got some questions about making a map:

1.Is it possible to rotate the objects vertically?cookie


It certainly is. Now, do you mean via script or in the actual editor?

Gordon_W has written
2.How to spawn unit and item immediately by a trigger?


Are you triggering something just in one map? you could use on:loadmap

1. actual editor

2.Yes, would U mind to show me some examples?

old Re: Scripting Questions

Psytechnic
User Off Offline

Quote
Gordon_W has written
1. actual editor


Hover over the item and hold space to show the axis' and drag the balls on the end of them to rotate.

Gordon_W has written
2.Yes, would U mind to show me some examples?


Some of the stranded II original adventure maps have examples. Open them and have a look at the map scripts. That's usually where it's placed.

old Re: Scripting Questions

jauke
User Off Offline

Quote
Can some1 please help me with this :
For my mod i need the script to set firemakingsucces higher on skill-level up.
I don't know how to do this --> please help

old Re: Scripting Questions

Gordon_W
User Off Offline

Quote
Psytechnic has written
Gordon_W has written
1. actual editor


Hover over the item and hold space to show the axis' and drag the balls on the end of them to rotate.

Gordon_W has written
2.Yes, would U mind to show me some examples?


Some of the stranded II original adventure maps have examples. Open them and have a look at the map scripts. That's usually where it's placed.


I see,thx!

old Re: Scripting Questions

Vectarrio
User Off Offline

Quote
jauke has written
Can some1 please help me with this :
For my mod i need the script to set firemakingsucces higher on skill-level up.
I don't know how to do this --> please help

There is one global variable in s2: $s2g_firesuccess

old Re: Scripting Questions

jauke
User Off Offline

Quote
Vectar666 has written
jauke has written
Can some1 please help me with this :
For my mod i need the script to set firemakingsucces higher on skill-level up.
I don't know how to do this --> please help

There is one global variable in s2: $s2g_firesuccess


Yes , i know but how do i raise this number of firesucces when i've trained a "skill-level-up" ?

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
jauke has written
Yes , i know, but how do i raise this number of firesucces when i've trained a "skill-level-up" ?


It's at the bottom of "Game.inf". should be at least

old Re: Scripting Questions

The Second
User Off Offline

Quote
how can I make a own variable for every unit that is created by a timer? (If it is needed)
I just want to get these units disappear after a little while...
I made something like this:
1
2
3
4
5
6
7
8
9
10
on:create {
   timer "self", 500, 9, dec;
   $alpha=9;  --> every unit's alpha gets normalized... :notok:
}
on:dec {
   $alpha--;  --> every unit's alpha gets decreased... :notok:
   alpha 0.$alpha;
   if ($alpha==0) {
    free "self";
}}

old Re: Scripting Questions

Cantorsdust
User Off Offline

Quote
I would like to know how to change how long it takes for plants to grow and how long it takes for fruits to spawn.

I suspect I need to go in game.inf and edit
1
2
3
4
5
6
7
8
9
10
11
12
13
//Berry
			}elseif ($item==46){
				if (skillvalue("plant")>=50){
					if ($y>0){
						if (freespace($x,$y,$z,30,1,0,0,0)){
							freestored "unit",1,46,1;
							$id=create("object",46,$x,$z);
							spawntimer $id,-9;
							process "planting berry bush",400;
							play "dig.wav";
							play "mat_leaf1.wav";
							event "iskill_plant","global";
						}else{
and edit spawntimer to a smaller number than -9, say -1.

I also think I need to go to objects_bushes.inf and edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
### Berry Bush
id=46
name=Berry Bush
group=bush
icon=gfx\berrybush.bmp
model=gfx\bush12.b3d
fx=16
scale=0.5
col=0
health=150
find=15,20,1
autofade=300
spawn=46,3,10,5,10,3,5
mat=leaf
growtime=10
script=start
	on:plant {
		spawntimer "self",-9;
	}
script=end
and edit spawntimer to -1 and growtime to 1 as well. Can anyone explain to me what these variables do?

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
Spawntimers are just how many seconds it takes to spawn into the game after technical creation (I think). Growtimers are definitely how long (in days) it takes to grow.

old Re: Scripting Questions

Cantorsdust
User Off Offline

Quote
Bloodshot has written
Spawntimers are just how many seconds it takes to spawn into the game after technical creation (I think). Growtimers are definitely how long (in days) it takes to grow.


But does growtime also affect the length of the period of time between fruit spawns? I would like to shorten the time between berry or banana spawns to once a day.

Or does growtime affect both the time to grow from seed and the period of time between fruit spawns?

In addition, do you know where I should change the value, or should I just change both to be sure?

old Re: Scripting Questions

bezmolvie
User Off Offline

Quote
That's "spawn=46,3,10,5,10,3,5", it's the ID, the length between growing periods, and the rest is where to put it and where to face (rotate) it.

old Re: Scripting Questions

Cantorsdust
User Off Offline

Quote
Bloodshot has written
Spawntimers are just how many seconds it takes to spawn into the game after technical creation (I think). Growtimers are definitely how long (in days) it takes to grow.


I changed growtime and the length between growing periods to 1 in every instance, and then planted berries. Interestingly, the berries grew in one day, and they spawned new berries every day, but there was 9 day lag between the planting and when they started spawning berries.

If you look at the spawn timer for a fruit plant, it is always one day less than the growtime of the plant.

Based on this evidence, I think spawntimer defines, in days, how long after planting should the game start spawning fruit.

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
This script goes in a object of mine, problem is it don't work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
on:start {
	addstate "object",1,8;
	addstate "object",1,25;
	addstate "object",1,17;
}
on:create { event "start"; }
on:spawn  { event "start"; }
on:build  { event "start"; }
on:use {
	if (playergotitem(250) > "0" ) {
		dialoge "start","sys\scripts\tempel.txt";
	} else { msg "!3Jeg trenger en stav";
		msg "!3for ä drive trolldom"; }
}
script=end

All I get as a error message:
Console has written
Expecting semicolon
row=11
col=8
event=use


Anyone who knows what to do? cookies
To the start Previous 1 284 85 86121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview