Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * = red syntax
- *install invisible flag agent
- *using my range '14854' so the mistletoe doesn't clash with other patch plants:
- new: simp 1 205 14872 "blnk" 0 0 9000
- *this is the script that the patch core will trigger when it's time to spawn mistletoe:
- setv name "spawn_script" 1000
- *sprite image file and frame when the mistletoe is fully grown:
- sets name "sprite_file" "mistletoe"
- setv name "sprite_pose" 4
- *classifiers (family, genus, species):
- setv name "prod_fmly" 2
- setv name "prod_gnus" 4
- setv name "prod_spcs" 14872
- *set va00 to targ, enumerate all the instances of the patch core agent
- *send a message to that patch core agent that script 1000 is being targetted:
- seta va00 targ
- enum 1 1 22929
- mesg wrt+ targ 1000 va00 0 0
- next
- *spawn:
- scrp 1 205 14872 1000
- inst
- *create mistletoe:
- **9 in order to import all images
- new: simp 2 4 14872 "mistletoe" 9 0 name "patch_plane"
- *mistletoe properties:
- **attr 80 = mistletoe invisible to creatures so they won't be eaten, and don't want them to suffer physics just yet.
- attr 80
- bhvr 48
- accg 3
- perm 60
- fric 100
- elas 80
- aero 1
- *move to co-ords sent by the core patch agent:
- mvto _p1_ _p2_
- setv name "patch_id" mame "patch_id"
- tick rand mame "tickfrom" mame "tickto"
- *default tick:
- doif tick eq 0
- tick 300
- endi
- endm
- *timer:
- scrp 2 4 14872 9
- ***Age it every Tick
- addv ov00 1
- doif ov00 eq 1
- * 2 = grow
- elif ov00 eq 3
- * 4 = grow
- else
- setv va00 pose
- addv va00 1
- pose va00
- endi
- *if it's older then 22 ticks, let it rot
- *elif ov00 gt 22*
- doif pose eq 5
- kill targ
- endi
- doif pose eq 8
- kill targ
- endi
- setv va00 pose
- addv va00 1
- pose va00
- **if it's fully grown and has been sitting on the plant for 10 turns, it should fall off the patch:
- *elif ov00 eq 14*
- doif attr eq 67
- setv name "patch_id" 0
- attr 195
- stop
- endi
- ***if it is fully grown, make sure creatures can see/grab it:
- *elif ov00 eq 11*
- doif attr eq 80
- attr 67
- endi
- stop
- *endi*
- endm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement