Welcome to the Builder Academy

Question flying bug - down to 1 little issue, then we have a snippet.Still need help pls

More
02 May 2013 19:09 - 15 May 2013 19:50 #2069 by JTP
Ok if i cast fly on character, then he/she still walks, should be flying.
Last edit: 15 May 2013 19:50 by JTP.

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

More
02 May 2013 19:55 #2070 by Kewlb
Replied by Kewlb on topic flying bug
depends on other commands you enter.. type fly to float into the air.

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

More
02 May 2013 20:11 - 02 May 2013 20:11 #2071 by JTP
Replied by JTP on topic flying bug
it sets AFF fly, but says leaves north instead of flies north

typing just fly dont do anything

a look in room says charname is standng here, even with AFF fly on
Last edit: 02 May 2013 20:11 by JTP.

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

More
03 May 2013 04:18 #2074 by rudeboyrave
Replied by rudeboyrave on topic flying bug
you will have to add some things for the person to show flying when you look at the room.
in act.informative.c there is a function

list_one_char

it has all of the messages for sitting, meditating, sleeping, standing, etc. Add one for flying.
Code:
" is lying here dead", " is lying here mortally wounded", " is lying here incapacitated", " is lying here stunned", " is sleeping here", " is focusing here", " is meditating here", " is resting here", " is sitting here", "!FIGHTING!", "is standing here", +"is floating in mid air!"
(notice how the final position message has no comma but the one above it now does.)

you have defined flying as a position? if not it would help you to do so in structs.h.
Code:
// Positions #define POS_DEAD 0 /* < Position = dead */ #define POS_MORTALLYW 1 /* < Position = mortally wounded */ #define POS_INCAP 2 /* < Position = incapacitated */ #define POS_STUNNED 3 /* < Position = stunned */ #define POS_SLEEPING 4 /* < Position = sleeping */ #define POS_FOCUSING 5 /* < Position = focusing */ #define POS_MEDITATING 6 /* < Position = meditating */ #define POS_RESTING 7 /* < Position = resting */ #define POS_SITTING 8 /* < Position = sitting */ #define POS_FIGHTING 9 /* < Position = fighting */ #define POS_STANDING 10 /* < Position = standing */ +define POS_FLYING 11 /* fly away!!! */

Now all you do is have to change the position of the player in your do_fly command or whatever you are using.
simple. just add this.
Code:
GET_POS(ch) = POS_FLYING;

and if you have a land command or something of that nature make sure to add in
Code:
GET_POS(ch) = POS_STANDING;


as for the player leaving the room? check out the function do_simple_move in act.movement.c i think

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.
The following user(s) said Thank You: JTP

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

More
03 May 2013 10:08 - 03 May 2013 11:43 #2079 by JTP
Replied by JTP on topic flying bug
hmm there is no do_fly in stock tba, anyone have a do_fly code for fly spell not skill ?

all it does is set the AFF_FLY
Last edit: 03 May 2013 11:43 by JTP.

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

More
03 May 2013 11:22 - 03 May 2013 13:56 #2080 by JTP
Replied by JTP on topic flying bug
Can this be modified to also make a fly message, any ideas ?:

/* Generate the leave message and display to others in the was_in room. */
if (!AFF_FLAGGED(ch, AFF_SNEAK))
{
snprintf(leave_message, sizeof(leave_message), "$n leaves %s.", dirs[dir]);
act(leave_message, TRUE, ch, 0, 0, TO_ROOM);
}

Its the only one i found in the code resembling move messages.

And anyone have a fly code for fly spell ? Since fly is a spell in tba and i like it to stay that way
Last edit: 03 May 2013 13:56 by JTP.

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

Time to create page: 0.277 seconds