Jump to content

Die() trigger and summoned creatures


Recommended Posts

It seems Die() trigger not return true when duration of summoned creature expires (what makes sense). Is there a way to get similar behavior for such case?

I'm experimenting with LockScroll() action and it seems game crashes when scroll is locked on summoned creatures that is unsummoned because its duration expires. So I was hoping to solve this problem by unlock scroll in last script round.

Link to comment

When a creature is unsummoned, that's done by sending them to nowhere. At which point their scripts no longer run. There is nothing you can use in that creature's script to detect "I was just unsummoned", because that script wouldn't run anyway.

Doing something just before the summoning's duration runs out? That would involve delayed effects in the spells/abilities that summon the creature.

Link to comment
On 4/11/2023 at 6:37 PM, jmerry said:

When a creature is unsummoned, that's done by sending them to nowhere. At which point their scripts no longer run. There is nothing you can use in that creature's script to detect "I was just unsummoned", because that script wouldn't run anyway.

Doing something just before the summoning's duration runs out? That would involve delayed effects in the spells/abilities that summon the creature.

Eh, pity there is no easy way to do this. Some hacks could probably work, but since game stability is at stake and I have some acceptable fallback I would probably resign from touching that. Thanks for clarification.

Link to comment
10 minutes ago, deratiseur said:

the creature is summoned for 2 turns. In his script, had a timer for 119 seconds, and an action at the end of the timer -> 1 second before the unsummon. Done for my mod summoned minions, work.

Could you give some link to your mod?

This was creature added by your mod right? So you kind of know beforehand in creature script for how long it was summoned?

Link to comment

sorry, my mod is in progress, will be released in ....... a long time. but i can give you by mp a link to a wip version, just let me package it. (note, the scritp fot these summoned is for oBG2 only, it don't work on BG2EE (a part of the script (not all) isn't working on BG2EE)

 

oops, i cannot do it for now. i've have to reinstall for being sure it's ok, but i've made some changes which need many WRITE_BYTE code before installation, so before test. So here is the script. One part to force him to be unsummoned after 3 turns, one part to automatically resurrect him 6 rounds after each death, and the third part to make him an ally and re-equip him, because resurrecting him cuts off the summoning link, de-equips him and removes the linked "unsummon" effect (hence the first part of the script). This script only work on oBG2, because oBG2 can cast a spell (ressurection) on a dead creature, BG2EE can't.

(pxl2kurg : the kurgan, from Highlander first movie)

pxl2kurg.baf

Edited by deratiseur
Link to comment
41 minutes ago, deratiseur said:

oops, i cannot do it for now. i've have to reinstall for being sure it's ok, but i've made some changes which need many WRITE_BYTE code before installation, so before test. So here is the script. One part to force him to be unsummoned after 3 turns, one part to automatically resurrect him 6 rounds after each death, and the third part to make him an ally and re-equip him, because resurrecting him cuts off the summoning link, de-equips him and removes the linked "unsummon" effect (hence the first part of the script). This script only work on oBG2, because oBG2 can cast a spell (ressurection) on a dead creature, BG2EE can't.

This can actually work for me. I would need to change summon spell I want to target to have unlimited duration and unsummon via script with some additional cleanup. Thanks!

Edited by marchitek
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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

×
×
  • Create New...