Jump to content
  • 0

Question

Posted

Hello,

I've made a costume monster and added the command line
setunitdata UMOB_DMGIMMUNE,1;
is there anyway i can disable the monsters immunity to a specific weapon.
lets say MVP X can only be hit by Weapon called Z, how would i go into that ?
at the same time i don't want it to disable it's immunity, so if a normal weapon and Z weapon is attacking at the same time,
the normal weapon will still deal 0 damage but the Z weapon would deal damage.
or is there any other way ?

any hint is appreciated.

Thanks,

2 answers to this question

Recommended Posts

  • 0
Posted

there are some trick you can try if you dont have any available src mod to support it yet.

  - Id: 1203
    AegisName: Knife__
    Script: |
      donpcevent "Sample::OnAttack";
-	script	Sample	-1,{
OnAttack:
	.@gid = <MONSTER_GID>; // SET YOUR MONSTER GID HERE
	if (!unitexists(.@gid)) end;
	getunitdata .@gid, .@data;
	
	if (.@data[UMOB_HP] <= 1000) {
		unitkill .@gid;
		end;
	}
	
	setunitdata .@gid, UMOB_HP, (.@data[UMOB_HP] - 1000);
	end;
}

every attack shall reduce the monster HP by 1000.

use at your own risk, script like these may cause performance issues, or max event queues, etc.

  • 0
Posted
On 4/25/2023 at 1:51 PM, Emistry said:

there are some trick you can try if you dont have any available src mod to support it yet.

  - Id: 1203
    AegisName: Knife__
    Script: |
      donpcevent "Sample::OnAttack";
-	script	Sample	-1,{
OnAttack:
	.@gid = <MONSTER_GID>; // SET YOUR MONSTER GID HERE
	if (!unitexists(.@gid)) end;
	getunitdata .@gid, .@data;
	
	if (.@data[UMOB_HP] <= 1000) {
		unitkill .@gid;
		end;
	}
	
	setunitdata .@gid, UMOB_HP, (.@data[UMOB_HP] - 1000);
	end;
}

every attack shall reduce the monster HP by 1000.

use at your own risk, script like these may cause performance issues, or max event queues, etc.

thx

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...