Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "Basic plant script"

From Creatures Wiki
Jump to navigation Jump to search
Line 48: Line 48:
 
The next part is setting the variable we will use.
 
The next part is setting the variable we will use.
  
setv ov10 rand 200 1000
+
setv ov10 rand 200 1000
  
 
In this object, ov10 is the lifespan of the plant. We're setting it randomly from 200 to 100. We'll see how to use this variable later.
 
In this object, ov10 is the lifespan of the plant. We're setting it randomly from 200 to 100. We'll see how to use this variable later.
Line 54: Line 54:
 
Almost done the install script! There is one more little chunk of code here.  
 
Almost done the install script! There is one more little chunk of code here.  
  
mvsf game "CreatorX" game "CreatorY"
+
mvsf game "CreatorX" game "CreatorY"
velo rand 10 25 rand 0 -10
+
 
 +
velo rand 10 25 rand 0 -10
  
 
This will move the object to the Creator, whether it be the DS Agent Injector or the C3 Creator.  
 
This will move the object to the Creator, whether it be the DS Agent Injector or the C3 Creator.  

Revision as of 00:32, 20 February 2005

Introduction

Here is a very simple, base plant script which you can use for virtually any plant. It uses a few basic variables, and a clever way of growing devised by nornagon.


  • create the plant!
new: simp 2 4 50000 "basicplant" 3 0 rand 200 6000

But what does this mean?

  • new: This means exactly what it says. New. Signifies the beginning of an install script, usually.
  • simp means that the agent is simple, not complex
  • 2 is the family
  • 4 is the genus; 4 = plant
  • 50000 is the unique classifier
  • "basicplant" is the name of the image file which is situated in the images folder. So, this agent uses the image 'basicplant.c16'.
  • 3 is the number of images in the image file
  • 0 is the start image
  • rand 200 6000 sets the plane of the agent randomly from 200 to 6000.

Ok, the next few parts set the objects properties.

bhvr 48
attr 199
perm 40
emit 7 1
accg 3
elas 25
fric 90
aero 2
  • bhvr is the actions Creatures can perform on the object. A series of numbers signify different actions. IE, 1 means norns can activate the object. Then you add the numbers together, and in this case it equals 48.
  • attr is the attributes of the object. It works in the same way bhvr does, but in this case, the numbers signify gravity, whether the hand can activate it, and other things. In this case, it equals 199.
  • perm is the permanency of the object. It goes from 0 to 100, 0 meaning that it can go through anything, such as walls etc, and 100 meaning it can't go through anything.In this case, it can go through some types of floor and wall, but mostly can't.
  • emit is the smell an object emits. Creatures navigate using smells, so its important that objects emit them. In this case, its emitting plant smell.
  • accg is the acceleration of an object as it falls down. Fairly obvious, really.
  • elas is the elasticity of an object, as in, how much it bounces. This object bounces a bit, but not much. 0 is no bounce, 100 means it never stops bouncing.
  • fric is the friction of an object, strangely enough. 0 means it doesn't move along the ground at all when thrown, 100 means it will continue sliding forever.
  • aero is the aerodynamics of an object. (Better explanation needed here)

The next part is setting the variable we will use.

setv ov10 rand 200 1000

In this object, ov10 is the lifespan of the plant. We're setting it randomly from 200 to 100. We'll see how to use this variable later.

Almost done the install script! There is one more little chunk of code here.

mvsf game "CreatorX" game "CreatorY"
velo rand 10 25 rand 0 -10

This will move the object to the Creator, whether it be the DS Agent Injector or the C3 Creator.

  • mvsf is, in english, move to a place nearby thats safe. In this case, we want it to move to somewhere safe near the Creator.
  • velo is the velocity the object appears with. This variable may look a little complicated, but in actuality is quite simple. (Better explanation needed here)
endm 

You've just finished the install script! Congratulations! Now, moving onto the next script..

The Timer Script

Coming soon..