Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SPEECH for animals and action for NPC
Author Message
Walrim
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2014
Reputation: 0



Post: #1
SPEECH for animals and action for NPC
At first, sorry for my English.

I started to make some nice scripts for animals, like a cat following Players when hungry and the Player having Food in his Backpack.
The new one will be for Dogs, to make them doing something like, bringing back a Stick or going to their doghouse and stay there.

The short Question at first, is it possible to give animals an additional speech, other then spk_pet ( Speech block associated to pets in sphere.ini), without making them say “Thank you” after feeding?

And the the second one. I try to figure out how action for an NPC works.
The first ones are clear, this are the Skills, but I have problems to understand the higher numbers.
Like action 101, making it stay but move again when someone is running against it and action 116 make it stay and keep staying when someone is running against it.
Is there some kind of list with the meaning of these actionnumbers?
And is it possible in these way to get the associated arguments.
Like action 100 themes to by “follow” but I can't figure out which uid is associated with it or where it is saved to hand it over.
Same thing with the location for action 102.
I new for some of these function are other ways to do it in script, but making an animal stay without someone saying “stay” or “stop” is like throwing nails though it's feet.
01-23-2016 09:44 PM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #2
RE: SPEECH for animals and action for NPC
1) Perhaps in sphere_msgs.scp, you can set npc_pet_food_no and npc_pet_food_ty to "".
2) I didn't know that ACTION meant other than the skill the char is currently using. Anyways, you can try to do them HEAR stay or HEAR stop.
01-23-2016 11:24 PM
Find all posts by this user Like Post Quote this message in a reply
Walrim
Apprentice
*

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2014
Reputation: 0



Post: #3
RE: SPEECH for animals and action for NPC
Thank you, I will try this way.

As I figured out so far, beside the skills, action has additional functions between 100 and 116.
But some functions I could not identify by trying, and don't know if it is possible to use it with arguments or set the arguments manually.
01-24-2016 03:35 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #4
RE: SPEECH for animals and action for NPC
I found that in the source, give it a look:
Code:
    NPCACT_FOLLOW_TARG = 100,    // 100 = following a char.
    NPCACT_STAY,                // 101
    NPCACT_GOTO,                // 102 = Go to a location x,y. Pet command
    NPCACT_WANDER,                // 103 = Wander aimlessly.
    NPCACT_LOOKING,                // 104 = just look around intently.
    NPCACT_FLEE,                // 105 = Run away from target. m_Act_Targ
    NPCACT_TALK,                // 106 = Talking to my target. m_Act_Targ
    NPCACT_TALK_FOLLOW,            // 107 = m_Act_Targ / m_Fight_Targ.
    NPCACT_GUARD_TARG,            // 108 = Guard a targetted object. m_Act_Targ
    NPCACT_GO_HOME,                // 109 =
    NPCACT_BREATH,                // 110 = Using breath weapon. on m_Fight_Targ.
    NPCACT_RIDDEN,                // 111 = Being ridden or shrunk as figurine.
    NPCACT_THROWING,            // 112 = Throwing a stone at m_Fight_Targ.
    NPCACT_TRAINING,            // 113 = using a training dummy etc.
    NPCACT_Napping,                // 114 = just snoozong a little bit, but not sleeping.
    NPCACT_FOOD,                // 115 = Searching for food
    NPCACT_RUNTO,                // 116 = Run to a location x,y.
02-04-2016 04:04 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)