Welcome to the Builder Academy

Question Need help with this meditate skill

More
23 Mar 2016 00:28 #5677 by WhiskyTest

Is it feasible just to change meditate to be an affection or event that only works when you are sitting? Seems kind of counter-intuitive to make it a character position honestly.

This would be easier. I would copy the HIDE skill. Meditating would set AFF_MEDITATE on the character and take it from there.

In structs.h standing is 8. I added flying as 9 and meditate as 10...total of 11, because dead is 0.

Not sure i undertand what you mean by it ?

Example:
{ "north" , "n" , POS_STANDING, do_move , 0, SCMD_NORTH },

For commands the third entry is the minimum position, POS_STANDING for this command.
As we know, POS_STANDING is defined as 8.

command_interpreter() is what handles all our commands, and you'll see this line towards the bottom:
Code:
else if (GET_POS(ch) < complete_cmd_info[cmd].minimum_position)

So in this example the "north" command will not work if GET_POS(ch) is less than 8. That's what stops people who are DEAD, SLEEPING, RESTING etc from being able to move because their definitions are all less than 8.
In your code you have POS_MEDITATE set to 10.

You could try re-numbering the positions so that POS_MEDITATE is between resting and sleeping - but I'm not sure what other pieces of code rely on the definitions - have a look at void hit() in fight.c and you'll see a spot where damage modifiers use the definitions numbers to alter how hard someone gets hit. There may be other instances like this hidden around.

Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds