Forum

> > Stranded II > Scripts > Growing Script
Forums overviewStranded II overview Scripts overviewLog in to reply

English Growing Script

1 reply
To the start Previous 1 Next To the start

old Growing Script

Lion_Hearted
User Off Offline

Quote
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...
edited 1×, last 21.05.11 11:27:31 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview