|
Development Forum |
 |
|
 Mad Scientist
clohse
 

|
8/12/2013 | |
Can you guys please take a look at my seed timer script and help me figure how come it won't grow?
***seed timer - to make it grow
scrp 2 3 16107 9
*if still falling stop
doif fall eq 1
stop
endi
*if being carried stop
doif carr ne null
stop
endi
*Check how many plants are nearby
setv va20 0
esee 2 4 16116
addv va20 1
next
* If there are < 5 plants nearby
doif va20 le 5
subv ov50 1
* Are you ready to grow?
doif ov50 le 1
gsub grow
else
stop
endi
endi
subr grow
inst
setv ov10 posx
setv ov11 post
subv ov11 160
new: simp 2 4 16116 "seedplant" 8 2 4200
tick 1
attr 192
frat 2
anim [0 1 2 3 4 5 6 7 255]
mvsf ov10 ov11
over
targ ownr
kill targ
retn
endm |
CLohse's Norns at the Creatures Repository |
 Prodigal Sock
Ghosthande
    

|
8/13/2013 | |
It looks okay to me, for the most part. But where is ov50 initially set (and what is its significance)?
 |
 Mad Scientist
clohse
 

|
8/13/2013 | |
Thanks for checking it out.
Ov50 is the sprout countdown. It was set in the install script. I deliberately kept it small during testing so i could see changes immediately.
CLohse's Norns at the Creatures Repository |
 Prodigal Sock
Ghosthande
    

|
8/15/2013 | |
Hmm... yeah, I really don't see anything wrong with it. This part of the code, at least. It looks like it should work fine.
Usually if I encounter a problem like that, I start making the agent play different sound effects at different parts of the script. That can make it easier to tell what part of the script it's able to reach, which conditions are or aren't being used, etc. It's noisy, but effective. 
 |
 Mad Scientist
clohse
 

|
8/15/2013 | |
That is a great suggestion! I hope i can hear it over my kids episodes of Dr. Who. 
CLohse's Norns at the Creatures Repository |

Liam
  

|
8/15/2013 | |
You can always use the CL Debug tool, and use DBG: OUTS and DBG: OUTV That's what I tend to use when debugging, it's incredibly handy. (And possibly less noisy than sounds!)
- Liam / K'aeloree
Spellhold Studios, a Baldur's Gate II, Neverwinter Nights and Oblivion Modding Community |
 Mad Scientist
clohse
 

|
8/16/2013 | |
I've not used this mystical Debug tool, or the DBG statements. I never messed with the DBG statements because i could't figure out where their messages would end up going. Am I making things harder than they have to be again?
CLohse's Norns at the Creatures Repository |

Malkin
     Manager

|
8/16/2013 | |
A general set of instructions can be found here: CAOS Debugger, but the CAOS debugger itself can be found here (direct download) - when the Gameware website changed domains a little while back, not all of the links were migrated.
My TCR Norns |