|
Development Forum |
 |
| Object Size Increasing When Activated? | |
|
 Tea Queen
Laura
    

|
12/22/2013 | |
This agent has six frames and is supposed to increase in size by one each time it's clicked by the Hand, or pushed by a creature. Except right now it doesn't. 
Here's the code:
*activate snowballs so they grow when clicked/pushed by Hand/creature:
scrp 2 21 14867 1
*played with toy stim:
stim writ from 97 1
*grow:
doif pose < 5
setv va00 pose
addv va00 1
pose va00
endi
endm |
Any thoughts would be appreciated! |

Malkin
     Manager

|
12/22/2013 | |
Do you get a bounding box error?
What does the install script look like, have you told it use 5 frames for the snowball?
My TCR Norns |
 Tea Queen
Laura
    

|
12/22/2013 | |
There's no error; the snowballs appear in-game fine, they just don't increase in size, as they should, each time they're clicked or pushed.
Here's the relevant part of their install script:
*vend snowballs:
setv va00 posx
setv va01 posy
new: simp 2 21 14867 "snowman" 6 1 501
bhvr 33
attr 195
elas 10
aero 5
accg 7
perm 100
fric 50
mvsf va00 va01
targ ownr
unlk
endm |
|
 Mad Scientist
clohse
 

|
12/22/2013 | |
When I tested a test file with your code the hand couldn't click on it. When I switched to attr 196 it worked fine.
CLohse's Norns at the Creatures Repository |
 Tea Queen
Laura
    

|
12/22/2013 | |
Thank you, Clohse! That worked a treat. Any idea on how to stop the snowballs growing when I pick them up, though?
*vend snowballs:
setv va00 posx
setv va01 posy
new: simp 2 21 14867 "snowman" 6 1 501
bhvr 33
attr 199
elas 10
aero 5
accg 7
perm 100
fric 50
mvsf va00 va01
targ ownr
unlk
endm |
|

Malkin
     Manager

|
12/22/2013 | |
Have you tried using Amaikokonut's ATTR calculator to check off the attributes you want to give your agent? I find it really useful. 
If you want your agent to be clicked by the hand, it's useful to set a clac event.
My TCR Norns |
 Mad Scientist
clohse
 

|
12/22/2013 | |
They don't grow when I pick them up. It sounds like another attr issue though. Like maybe the attr is set to allow the hand to activate but not pick up the object? Attr 199 should allow them to be picked up by the hand.
I have used attrCalc to check my attr and bhvr values since I started learning about making agents. I love it. (Windows only)
CLohse's Norns at the Creatures Repository |
 Tea Queen
Laura
    

|
12/22/2013 | |
I'll definitely look into setting CLAC events, but adding a basic pick up script seems to have solved the growing-when-picked-up issue. 
By the way, thanks for those ATTR calculator links; they'll prove to be very useful. I wish I'd known about them before! |