Jump to content

Home

Make an explosion


Vox Kalam

Recommended Posts

Open the .utd file of the door and put this script in the onOpen event of the door:

void main() {
int nDamage = 20;

// Apply some damage to door opener.
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_PIERCING), GetLastOpenedBy());

// Explosion.
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(3003), GetLocation(OBJECT_SELF));

}

Save the .utd and script into override. The changes won't take effect if you use a save where you have already entered the module before. Make sure the template file name for the door is unique.

Link to comment
Share on other sites

Open the .utd file of the door and put this script in the onOpen event of the door:
void main() {
int nDamage = 20;

// Apply some damage to door opener.
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage, DAMAGE_TYPE_PIERCING), GetLastOpenedBy());

// Explosion.
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(3003), GetLocation(OBJECT_SELF));

}

Save the .utd and script into override. The changes won't take effect if you use a save where you have already entered the module before. Make sure the template file name for the door is unique.

how does scripting like that actually work?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...