creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Teleporting sprouts   
Geek2Nurse

Geek2Nurse
United States  

 visit Geek2Nurse's website: Adventures in Nornia
  5/1/2012

Okay, I can't figure this one out...I've got seeds, and they sprout, but even though I'm getting the posx and posy of the seed and telling the plant to show up there, and they're in the same sprite file and in the same position in the sprite images, the sprouts jump over and sprout at some point off away from the seed instead of sprouting from the seed like good little real-world plants. I tried changing mvsf to mvto and got my new sprouts killed by auto-kill for my trouble.

Does the sprout location have something to do with the puhl coordinates on the seed? That's the only thing that's different between the seed sprites and the plant sprites...or is there something else I'm missing?


---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 
mea
Chaotic Spriter

mea


 visit mea's website: Caos of the Creatures Realm
  5/1/2012

The only time I have really encountered anything like that is if there isn't enough room in that spot for the full grown plant. Then the plant will get pushed to a nearby spot where there is enough room.
 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  5/1/2012

The last post in this thread describes what you've been seeing. Hope it helps. :)

My TCR Norns
 
Liam

Liam


 visit Liam's website: Spellhold Studios
  5/1/2012

That's because objects are created from the top left-hand corner.

So, when you get the posx and posy of the seed, the plant object's top right-hand corner is as close to those coordinates as possible--so it "jumps" to the right.

What you need to do is something like:


setv va00 posx
setv va01 posy

new: simp etc
attributes

setv va02 wdth
divv va02 2
subv va00 va02

setv va03 hght
subv va01 va03

doif tmvt va00 va01 eq 1
mvsf va00 va01
else
kill targ
endi


- Liam / K'aeloree

Spellhold Studios, a Baldur's Gate II, Neverwinter Nights and Oblivion Modding Community

 
Geek2Nurse

Geek2Nurse


 visit Geek2Nurse's website: Adventures in Nornia
  5/1/2012

Aha, light bulb flashes...can't make it so we measure things all the same way, nonono, that would be too simple! Thanks for the example, Liam, that's really helpful.

Thanks also for the link, Malkin-- I did not know mvsf is DS-only. Can we just make a rule that everyone must play C3/DS docked-only? ;)


---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 
ylukyun
Patient Pirate

ylukyun

Manager



  5/1/2012

It is?!? Eh, I'm sure I knew that at some point...

How many people here still play C3 standalone? I started out doing that, but I almost never do. None of the good agents even inject, and most exports only work for DS.

Loving your agents by the way Geek2Nurse. Keep up the great work! (And let me know if you need some webspace to host them.)

 
Geek2Nurse

Geek2Nurse


 visit Geek2Nurse's website: Adventures in Nornia
  5/1/2012

Thanks, Ylukyun! I'm having fun...my mid-life career change from tech to nursing didn't *totally* eliminate my geek side, although it has left me a bit behind the power curve, since I've had to reallocate so many brain cells to nursing knowledge. ;)

Thanks for the generous offer! I've got server space, though. Hosted too many family/friends' websites in my tech days to be allowed to let it go, no matter how much I might pretend not to be a geek any more...so it's just a matter of making a site for them to sit in, if it comes to that.

As for C3/DS, I've never played it any way but docked, so I'm clueless as to which parts belong to what!


---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 
Papriko
Peppery One

Papriko



  5/1/2012

Liam wrote:
setv va00 posx
setv va01 posy

new: simp etc
attributes

setv va02 wdth
divv va02 2
subv va00 va02

setv va03 hght
subv va01 va03

doif tmvt va00 va01 eq 1
mvsf va00 va01
else
kill targ
endi

Why so complicated? POSL (left-most corner) and POST (top-most corner) seem to do the same job much quicker:
setv va00 posl
setv va01 post


doif tmvt va00 va01 eq 1
mvsf va00 va01
else
kill targ
endi

According to the initial post are both objects of the same size, so this code works fine too while using several lines less.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
RisenAngel
Sanely Insane

RisenAngel

Manager


 visit RisenAngel's website: The Realm
  5/1/2012

I'm one of those people who still uses C3 standalone on a regular basis (to the point where most of my agents work with both games - even the metarooms). As such, I can safely say that "mvsf" is, in fact, a command that
works with both games since many of my agents make good use of it.


~ The Realm ~
Risen Angel's Creatures Blog


 
Geek2Nurse

Geek2Nurse


 visit Geek2Nurse's website: Adventures in Nornia
  5/1/2012

Good to know, Grendel_Man, thanks! I won't feel guilty for using it now. ;)

---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 
Liam

Liam


 visit Liam's website: Spellhold Studios
  5/1/2012

Papriko: That still makes the agent "jump" to the right on creation if the created plant's width is larger than the seed's width. :)

- Liam / K'aeloree

Spellhold Studios, a Baldur's Gate II, Neverwinter Nights and Oblivion Modding Community

 
Papriko
Peppery One

Papriko



  5/2/2012

As I said, from the initial post I guessed that they have the same size.

EDIT: Aw, too bad, I looked up once more and saw that I probably misunderstood it. My bad, sorry!


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 


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