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 284 85 86121 122 Nächste Zum Anfang

alt Re: Scripting Questions

filfer
User Off Offline

Zitieren
Castero66 hat geschrieben
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

alt Re: Scripting Questions

Gordon_W
User Off Offline

Zitieren
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?
1× editiert, zuletzt 14.01.10 12:24:26

alt Re: Scripting Questions

Psytechnic
User Off Offline

Zitieren
Gordon_W hat geschrieben
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 hat geschrieben
2.How to spawn unit and item immediately by a trigger?


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

alt Re: Scripting Questions

Gordon_W
User Off Offline

Zitieren
Psytechnic hat geschrieben
Gordon_W hat geschrieben
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 hat geschrieben
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?

alt Re: Scripting Questions

Psytechnic
User Off Offline

Zitieren
Gordon_W hat geschrieben
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 hat geschrieben
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.

alt Re: Scripting Questions

jauke
User Off Offline

Zitieren
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

alt Re: Scripting Questions

Gordon_W
User Off Offline

Zitieren
Psytechnic hat geschrieben
Gordon_W hat geschrieben
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 hat geschrieben
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!

alt Re: Scripting Questions

Vectarrio
User Off Offline

Zitieren
jauke hat geschrieben
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

alt Re: Scripting Questions

jauke
User Off Offline

Zitieren
Vectar666 hat geschrieben
jauke hat geschrieben
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" ?

alt Re: Scripting Questions

Someone Evil
User Off Offline

Zitieren
jauke hat geschrieben
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

alt Re: Scripting Questions

The Second
User Off Offline

Zitieren
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";
}}

alt Re: Scripting Questions

Cantorsdust
User Off Offline

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

alt Re: Scripting Questions

bezmolvie
User Off Offline

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

alt Re: Scripting Questions

Cantorsdust
User Off Offline

Zitieren
Bloodshot hat geschrieben
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?

alt Re: Scripting Questions

bezmolvie
User Off Offline

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

alt Re: Scripting Questions

Cantorsdust
User Off Offline

Zitieren
Bloodshot hat geschrieben
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.

alt Re: Scripting Questions

Someone Evil
User Off Offline

Zitieren
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 hat geschrieben
Expecting semicolon
row=11
col=8
event=use


Anyone who knows what to do? cookies
Zum Anfang Vorherige 1 284 85 86121 122 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht