That's not really much of a problem, but it is something I'd gladly get rid off.
When several creatures are summoned at once (with a unique power script), they all appear in the exactly same spot. You can "push them" to make them scatter, or they will just do so themselves if you move and they follow you, but still, it looks weird.
Is there any easy way to get rid of this?
Multiple summons appear on one another
Débuté par
Grani
, janv. 04 2014 10:58
#1
Posté 04 janvier 2014 - 10:58
#2
Posté 04 janvier 2014 - 11:29
EDIT:

one for me one for LightFoot
Modifié par ShaDoOoW, 06 janvier 2014 - 01:15 .
#3
Posté 04 janvier 2014 - 11:31
Change the unique power script to stagger the spot where it summons each one. any preference to how you would want them spaced? Random? Formation? working in a circle for the original?
#4
Posté 04 janvier 2014 - 11:33
No matter, they can be scattered randomly.
#5
Posté 04 janvier 2014 - 11:35
ShaDoOoW wrote...
not really with keeping the exact functionality, except the move workaround you could workaround summons completely via henchmens, but thats imo another story...
perhaps I missed something? I may need to see the Activate script before I give the answer above.
#6
Posté 05 janvier 2014 - 12:31
void OnActivate(object oEventItem, object oActTarget, location lActTarget, object oActivator)
{
effect eEffect;
object oPC = oActivator;
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
eEffect = EffectSummonCreature("na_skeleton2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
eEffect = EffectSummonCreature("na_zombie_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
eEffect = EffectSummonCreature("na_zombie2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oActivator, 300.0);
}
#7
Posté 05 janvier 2014 - 12:33
While we're at it, it's weird, but for some reason when I had only 5 summons (that's what I intended to have) in the script, only four were summoned in-game, the last one was omitted.
To have all 5, I needed to copy the last part and paste it, so that it's in fact 6 now in the script and 5 in-game.
(Also, the above is not the whole script, as you can see, because I have a single script for all unique power purposes)
To have all 5, I needed to copy the last part and paste it, so that it's in fact 6 now in the script and 5 in-game.
(Also, the above is not the whole script, as you can see, because I have a single script for all unique power purposes)
Modifié par Grani, 05 janvier 2014 - 12:36 .
#8
Posté 05 janvier 2014 - 04:21
I have struck out on finding a simple way of doing this. Most of the way I have ran through my mind would introduce other abnormality that would require other events to smooth out. In short the is no simple way to do it.
The reason you have to summons an extra creature is that nwn by design only allows one summonsed creature. When a second summons is created, the first summonsed creature is destroyed. The nwn engine created creatures during the script and destroys creatures after the script is finished running. Therefore when your second,third,fourth..... creatures are summonsed they are all sending a single to destroy the first creature, hence you have more then one summons through a loop hole in the engine.
This is also why it is harder to find a solution to your problem of them being summonsed on top of each other.
The reason you have to summons an extra creature is that nwn by design only allows one summonsed creature. When a second summons is created, the first summonsed creature is destroyed. The nwn engine created creatures during the script and destroys creatures after the script is finished running. Therefore when your second,third,fourth..... creatures are summonsed they are all sending a single to destroy the first creature, hence you have more then one summons through a loop hole in the engine.
This is also why it is harder to find a solution to your problem of them being summonsed on top of each other.
#9
Posté 05 janvier 2014 - 05:28
Could you use random vectors from the original target then get a location for each summons from the vector?
Modifié par Pstemarie, 05 janvier 2014 - 05:29 .
#10
Posté 05 janvier 2014 - 05:48
As far as summonsing at random vectors, no. the summons is an effect applied to the PC, Therefore there is no location to adjust.
First problem. without making the summons undestroyable ,the summoning has to be back to back, If not you are left with only one summons. the others are destroyed.
Second the Apply effect function is void returning, even if it wasn't it still would not return the creature summonsed, creating the need for another method of finding the creature to adjust its position.
Problem 3. The summons may not be the only Hench/Comp/summons the PC has. causing problems with just shouting a generic command to the summons to addjust there position.
ex. If I Gave a generic Follow me Command at the end of the script to get the Sommons to adjust there own positions. The hench who was in combat would stop fighting and run back every time the object was used.
First problem. without making the summons undestroyable ,the summoning has to be back to back, If not you are left with only one summons. the others are destroyed.
Second the Apply effect function is void returning, even if it wasn't it still would not return the creature summonsed, creating the need for another method of finding the creature to adjust its position.
Problem 3. The summons may not be the only Hench/Comp/summons the PC has. causing problems with just shouting a generic command to the summons to addjust there position.
ex. If I Gave a generic Follow me Command at the end of the script to get the Sommons to adjust there own positions. The hench who was in combat would stop fighting and run back every time the object was used.
Modifié par Lightfoot8, 05 janvier 2014 - 05:49 .
#11
Posté 05 janvier 2014 - 09:17
Ah, well, I see that even if it's possible, it's hell of a work. Not worth the trouble, I think, considering that it doesn't affect gameplay in any way.
#12
Posté 05 janvier 2014 - 10:25
Maybe I'm wildly missing something, but the default summon creature series has the following code:
Why couldn't you create randomized spawn points using vectors using GetSpellTargetLocation as a starting point and then using that new location instead of GetSpellTargetLocation?
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
Why couldn't you create randomized spawn points using vectors using GetSpellTargetLocation as a starting point and then using that new location instead of GetSpellTargetLocation?
#13
Posté 05 janvier 2014 - 11:10
MagicalMaster wrote...
Maybe I'm wildly missing something, but the default summon creature series has the following code:ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
Why couldn't you create randomized spawn points using vectors using GetSpellTargetLocation as a starting point and then using that new location instead of GetSpellTargetLocation?
ok, perhaps you are one of the only two sane people left in the thread, In that case it should be as simple as I originally thought. Once I get past the asumptions i made after looking at the posted code.
Let me work up some code.
#14
Posté 06 janvier 2014 - 12:04
ok, try this.
const float cDist = 5.0;
const int cNumbersumm = 5;
void OnActivate(object oEventItem, object oActTarget, location lActTarget, object oActivator)
{
effect eEffect;
vector vAdj;
object oArea = GetAreaFromLocation(lActTarget);
vector vPos = GetPositionFromLocation(lActTarget);
float fOrt = GetFacingFromLocation(lActTarget);
location lLoc;
float nDegAdj = 360.0/cNumbersumm;
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lActTarget, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*1)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*2)*cDist,fOrt);
eEffect = EffectSummonCreature("na_zombie_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*3)*cDist,fOrt);
eEffect = EffectSummonCreature("na_zombie2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*4)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*5)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
}
const float cDist = 5.0;
const int cNumbersumm = 5;
void OnActivate(object oEventItem, object oActTarget, location lActTarget, object oActivator)
{
effect eEffect;
vector vAdj;
object oArea = GetAreaFromLocation(lActTarget);
vector vPos = GetPositionFromLocation(lActTarget);
float fOrt = GetFacingFromLocation(lActTarget);
location lLoc;
float nDegAdj = 360.0/cNumbersumm;
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lActTarget, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*1)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*2)*cDist,fOrt);
eEffect = EffectSummonCreature("na_zombie_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*3)*cDist,fOrt);
eEffect = EffectSummonCreature("na_zombie2_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*4)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
lLoc = Location( oArea, vPos + AngleToVector( nDegAdj*5)*cDist,fOrt);
eEffect = EffectSummonCreature("na_skeleton_s", VFX_IMP_UNSUMMON, 1.0);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eEffect, lLoc, 300.0);
}





Retour en haut







