creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
TMVB Not Working   
the1whoscreams

the1whoscreams
United States  


  10/3/2017

So, I'm trying to do some more coding with my agent. Same one as the last topic I posted. I learned that TMVB exists and decided to use that. I think I know what's going on with this error I'm getting. TMVB is checking for a safe location for the "seed" form, not the "ungodly bio-machine that takes up way too much space" form. The seed detects a safe location, moves to that location, which is likely not a safe location for the machine, and then turns into said machine, putting itself in an invalid position and throwing an error. What should I do? The only fix I can think of is giving the seed the same bounding box as the machine, which defeats the purpose of it being easily portable.
 
GimmeCat

GimmeCat



  10/3/2017

Add a check to the seed's turning-into-machine function that does TMVB using the current coordinates. If the check fails, skip execution and delete the seed.

I'm assuming that if the user has clicked the seed in a bad place, the situation is already unsalvagable. Unless you want the seed to be pick-uppable after it's been clicked on?

 
Zzzzoot

Zzzzoot



  10/3/2017

That is an interesting problem.

Perhaps create a huge dummy agent in a known-safe location and use the dummy agent to do the TMVTs.

So like, make an invisible (to players and creatures) agent in the meso or norn terrarium. Test if that agent can be moved to your desired location. Then move/transform your actual seed.

You'd have to use TMVT and also do more math. But I think it should work.

 
GimmeCat

GimmeCat



  10/3/2017

Another idea- check the seed's Move status with MOVS. If the seed isn't currently being carried or in vehicle (one of those must count for the inventory, surely?) then it can be clicked. Otherwise, no.

Edit: Piggybacking off Zzzzoot's idea, you could spawn the machine in an off-screen location and then do the TMVT test. If it fails, delete the machine and reset the seed's clicked state.

 
the1whoscreams

the1whoscreams



  10/3/2017

I'll try that, Zzzzoot.

EDIT: It worked.

 


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
0 online
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