Jump to content
  • 0

Adding amotion delay to monster's attacks after player missed attack


Question

Posted (edited)

So I've gotten monsters to attack players on missed attacks by coding:

 

	// check if we're landing a hit
	if(!is_attack_hitting(&wd, src, target, skill_id, skill_lv, true)){
		wd.dmg_lv = ATK_FLEE;
		
		if (target->type == BL_MOB){
			struct mob_data *md = (struct mob_data *)target;
				if (md->attacked_id != src->id){
						sc_start4(target,target, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, wd.amotion);

		};
		}
		
	}


But my problem is- there is no amotion delay. A player might not even finish firing an arrow and a monster is already on top of him. Is there any easy way to make the mode change happen after the weapon animation has happened?

Edited by Humble_Bee

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...