creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
A couple of C2Caos questions   
GimmeCat

GimmeCat
United Kingdom  


  6/16/2015

Two questions :) here's the first:

Taking the Tomato fruit as an example, in this chunk of code:

doif ov00 eq 2
doif carr eq 0
doif intr ge 70
doif intr le 100
setv rnge 500
esee 2 4 1
addv var9 1
next


The instruction intr "Sets/returns the Inorganic nutrients at targ." What I'm wondering is, what's the value of "targ" if it hasn't already been set? In this script, targ is not set before this point in the code, so it must have a default value (or it wouldn't find any value).

If I were to manually set a new targ before these lines, would intr get a different value than the room it was in when this script was executed?


Second question:

I'm having a weird issue whereby an object I inject floats in the air when I drop it the first time. Picking it up and dropping it again makes it fall to the floor, as it should. The problem is, I can't see why this is happening.

The object is injected with attr 199, then 'slim' and 'edit' are called. What am I doing wrong here?

 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  6/17/2015

TARG at the Creatures Wiki implies that TARG defaults to the agent that owns the script that's currently running.

The CDN's Object Making Tutorials might give you some pointers on what's going on with your injection scripts.


My TCR Norns
 
GimmeCat

GimmeCat



  6/17/2015

Thank you for the links. :)

The thing is, my injection script is very similar to other scripts I've made in the past which work fine.

This is the faulty script:
inst
new: simp strb 11 16 1101 0
setv cls2 2 25 5647
setv attr 199
bhvr 0 67
setv size 50
setv ov00 0
setv ov01 var9
rndv var8 500 1000
tick var8
slim
edit
endm


And this one injects the object into my hand, whereupon a single rightclick drops it to the floor with gravity (note: neither of these scripts explicitly sets gravity):
inst
new: simp mtvn 8 0 200 0
setv cls2 2 6 8394
bhvr 0 67
setv attr 194
slim
pose 0
setv actv 0
tick 100
edit
endm


Neither of these objects has a 'drop' script, either.

 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
1 online
Kodathekobold
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki