Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Feeding Script

Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
10-03-2009 11:33
Looking to be pointed in the direction of a good feeding script - to be more exact where in the wiki would i begin to look? looked high and low for even scraps of something.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-03-2009 11:58
If you mean something that makes you look like you're eating, you're looking for an animation, not a script. If I were looking for something like that, I'd look in XStreetSL or ask in the Products Wanted forum. In world, you might try Depoz at http://slurl.com/secondlife/Depoz%20Celebrations/1/166/27 or Kitchen Korner Food at http://slurl.com/secondlife/Kitchen%20Korner/204/73/42. If I remember right, both places sell animated dinners and may sell the scripts/animations as well (although I doubt it), or maybe you can ask their creator.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
10-03-2009 14:51
No i'm looking for a feeding scrip as in "feeding the birds" "feeding the fish" and thanks but i'd rather script it myself -
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-03-2009 15:43
OK, but it's still an animation, not a script. Try asking the question over in the Animation Tips forum. You'll have better luck.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-03-2009 20:40
i'm assuming dragger is talking about feeding like the working fish tanks what will turn dirty if you don't clean them for so long and the fish will die if you don't feed them. i could be wrong though
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
10-04-2009 04:06
Not looking for an animation ... looking for a feeder script, a sender receiver "scripts" that will in effect give the impression something is being "fed" be it fish or birds or squirrels-

Lets put it this way - i have fantastic butterflies but they just fly around- would like to be able to rez something on a flower that attracts them, same with fish and birds and why not bees. Not an animation needed.
Pete Littlebird
Registered User
Join date: 30 Sep 2009
Posts: 44
10-04-2009 06:51
For the food:

CODE

default
{
touch_start(integer total_number)
{
llSay (-123, "Food!");
}
}


For the fish:

CODE

default
{
state_entry()
{
llListen (-123, "", NULL_KEY, "Food!");
}
listen (integer channel, string name, key id, string message)
{
vector food = llList2Vector (llGetObjectDetails (id, [OBJECT_POS]), 0);
llOwnerSay ("Food at " + (string) food);
llSetStatus (STATUS_PHYSICS, TRUE);
llMoveToTarget (food, 10.0);
llSetTimerEvent (5.0);
}
timer ()
{
llSetTimerEvent (0.0);
llSetStatus (STATUS_PHYSICS, FALSE);
}
}
Indeterminate Schism
Registered User
Join date: 24 May 2008
Posts: 236
10-04-2009 14:06
The above is probably what you want, but for those times when you have more prey than predators (as it were) you can have specific food-named objects and the 'predator' can scan for them instead of the food doing the calling.

llSensorRepeat("Shark Bait", NULL_KEY, PASSIVE, 10.0, PI, 10.0);
...
sensor(integer HowMany)
{
vector food = llDetectedPos(0);
...
}

Obviously, for server-load reasons, you'll want to put the script(s) in as few objects as possible so it's up to you to decide which way around it should be.
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
10-04-2009 19:07
There is an old pet protocol that supports food: http://lslwiki.net/lslwiki/wakka.php?wakka=PetProtocol032
I remember seeing other SL ecology scirpts around.