Over 10 years active!
 
HomeUseful information for Helbreath beginnersStatistics overviewSearchMemberlistGalleryRulesRegisterLog in

Post new topic   This topic is locked: you cannot edit posts or make replies.
 

 Como agregar un NPC movimiento

Go down 
3 posters
AuthorMessage
elchetofede


avatar

Silver 4
Earned by having 12 posts & comments.
10th Anniversary
Earned for being a member of the community for 10 years.

Likes : 2

Como agregar un NPC movimiento  Empty
#1PostSubject: Como agregar un NPC movimiento    Como agregar un NPC movimiento  999105/17/2020, 4:42 pm

Hola comunidad hoy vengo a consultar como podría agregar a un libro de npc que estoy agregando a mi servidor un gif npc o como se llama OBJECTMOVE, en el libro agrego todas la especificaciones del npc tanto cantidad de oro drop, damage y drop primario, pero me queme los libro como se puede agregar la imagen del npc en movimiento solo logre poner la imagen fija bueno les dejo unas imagenes desde ya muchas gracias


Roazir wrote:
English
In short, the server has an NPC display that includes its specifications, such as the amount of gold it drops, its damage and the primary drops.

In the list, he was able to add a JPG image, however, he wants to know how to add a GIF image instead of JPG.




[You must be registered and logged in to see this link.]


Last edited by Roazir on 5/17/2020, 5:38 pm; edited 1 time in total (Reason for editing : Translate)
Back to top Go down
324


324

Silver
Earned after your first post and comment.

Likes : 2

Como agregar un NPC movimiento  Empty
#2PostSubject: Re: Como agregar un NPC movimiento    Como agregar un NPC movimiento  999105/17/2020, 9:18 pm

Vos lo tenes que escribir en el lugar mas recondito de tu codigo, si es posible, antes de la declaracion de los headers, y ahi, lo reventas a variables.
Le tiras todo lo que puedas inicializar... no creas una clase! porque vas a ser habil programador y te comes un garron de la gran flauta:


Code:
// Game.cpp: implementation of the CGame class.
//
////////////////////////////////////////////////////////////

int temp_draw_animation_frame = 0;
int temp_prev_animation_time = 0;
int temp_dir = 0;
int temp_cycle = 0;

#include "Game.h"

#if LANGUAGE == ENGLISH
#include "lang_eng.h"

(...)



vos ahora estas en un estado de emocion violenta y locura
y lo reventas a codigos, lo zapateas arriba del m_DDraw.iFlip() en UpdateScreen_OnGame(),
para demostrar tu estado de locura y de inconsciencia temporal


Code:
        m_pSprite[17008 + temp_dir]->PutSpriteFast(50, 400, temp_draw_animation_frame, 100);
        if(!temp_prev_animation_time)
            temp_prev_animation_time = timeGetTime();
       
        if ( (dwTime - temp_prev_animation_time) > 50) {
            temp_draw_animation_frame++;
            temp_prev_animation_time = timeGetTime();
        }
        if (temp_draw_animation_frame > 3) {
            temp_cycle++;
            if (temp_cycle == 3) {
                temp_cycle = 0;
                if (temp_dir < 7)
                    temp_dir++;
                else
                    temp_dir = 0;
            }
            temp_draw_animation_frame = 0;
        }

        if (m_DDraw.iFlip() == DDERR_SURFACELOST) RestoreSprites();


segun la version que tengo, los sprites de los slimes estan en el indice 17008 de m_pSprite,
lo que tengas que editar (los ciclos, y la duracion de la animacion entre frames, etc) esta a la vista.

me explico???

ponele que es un prototipo, te falta terminarlo, podes seguir rompiendo el codigo mas roto de lo que esta, y en honor a los coreanos hacer algo asi:
con lo anterior ya mostras un slime... te creas una funcion Draw_Slime(...), copias pegas en otra funcion, Draw_Cyclop(...), cambias el indice por el que corresponda a los ciclopes

sos inimputable, hermano
Attachments
Como agregar un NPC movimiento  Download?action=showthumb&id=154slime.gif
(606 Kb) Downloaded 15 times
Como agregar un NPC movimiento  Download?action=showthumb&id=155cyclop.gif
(594 Kb) Downloaded 11 times
Back to top Go down
elchetofede


avatar

Silver 4
Earned by having 12 posts & comments.
10th Anniversary
Earned for being a member of the community for 10 years.

Likes : 2

Como agregar un NPC movimiento  Empty
#3PostSubject: Re: Como agregar un NPC movimiento    Como agregar un NPC movimiento  999105/18/2020, 1:57 am

Muchas gracias, ahora voy a modificar la velocidad porque se encuentra en un estado que es  inimputable esa slime...
Pregunta como averiguaste que la slime es el 17008, para ir sacando los demas npc, igual probando con los números los saco pero bueno no esta demás preguntar

Back to top Go down
elchetofede


avatar

Silver 4
Earned by having 12 posts & comments.
10th Anniversary
Earned for being a member of the community for 10 years.

Likes : 2

Como agregar un NPC movimiento  Empty
#4PostSubject: Re: Como agregar un NPC movimiento    Como agregar un NPC movimiento  999105/18/2020, 3:26 am

Bueno 324 no hace falta que respondas me queme un poco los libros para ya entendi que el 17000 es el numero que se le asigna a DEF_SPRID_MOB en SpriteId, asi que solo queda sacar los calculos muchas gracias

Te dejo unas imagenes para que veas que ya le atine jajaj, el nombre y drop aun no se cambiaron por las dudas

[You must be registered and logged in to see this link.]
Back to top Go down
LifeX


LifeX

Diamond 1
Earned by having 144 posts & comments.
Civilian
Granted to members for high engagement.
Great Mentor
Granted to veteran members who exhibit helpful and sportsmanlike behavior.
Moderator
Earned by becoming a board moderator.

Likes : 26

Como agregar un NPC movimiento  Empty
#5PostSubject: Re: Como agregar un NPC movimiento    Como agregar un NPC movimiento  999105/18/2020, 12:28 pm

This is very useful indeed. If you want you can share the codes with the community.

If not its cool, Good job.
Back to top Go down
Sponsored content






Como agregar un NPC movimiento  Empty
#6PostSubject: Re: Como agregar un NPC movimiento    Como agregar un NPC movimiento  99910

Back to top Go down
 
Como agregar un NPC movimiento
Back to top 
Page 1 of 1
 Similar topics
-
» Como modificar el Hp de los npc
» Como agregar mini map a nuevo mapa
» Agregar NPCs
» [CODE] Agregar critical potion
» No me deja Agregar items en :itemscfg

Permissions in this forum:You can reply to topics in this forum
JoinHelbreath.net :: General :: Help Zone✅-
Post new topic   This topic is locked: you cannot edit posts or make replies.Jump to: