Forum

> > Stranded II > Scripts > Growing Script
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Growing Script

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Growing Script

Lion_Hearted
User Off Offline

Zitieren
I'm trying to make a script that will make another object, but with a grow timer...

I'm doing this because trees, when you chop them down, naturally leave stumps, and often the stumps grow back the original tree. (Real life)

In stranded 2, I'm making all the trees (not palms) give stumps, and then trying to make the stumps make a new tree with a growth factor.

Heres my script...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
script=start
	on:create {
		local $age;
		$age=1;
	}
	on:changeday {
		if ($age>0){
			$age++;
			if ($age>4){
				local $id,$x,$y,$z;
				$x=getx("self");
				$z=use_z("self");
				$typ=random(10,17);
				$id=create("object",$typ,$x,$z);
				event "plant","object",$id;
				free "self";
			}
		}
	}
script=end

I have ID number 10-17 set so that they do have grow timers, and on plant scripts...

Why isn't it working? As it is now, the stump just disappears...

Please help me.

Edit:1

Nevermind, problem solved... it was just a simple mistype in the code.:)

Sorry for the extra thread DC...
1× editiert, zuletzt 21.05.11 23:27:31
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht