hello, rather than having a dispel magic wall, I'd prefer a wall that has collision that will prevent the trespassing of npcs and creatures
would it be possible?
I guess it could be done using a stock placeable and changing the texture (either by MDBCloner or using a dedicated visual effect file).
From what i found when making user summonable placeables it is not possible for placeables placed on the fly to affect the walkmesh, even if the placeable is set to not be walkable.
I think the only thing that could be done would be to have an on enter event which pushes the character back when they enter the area of effect. You could combine this with a placeable or a VFX. Would be tricky, you'd have to get their location, figure out which side they tried to enter on, then push them back. One way would be to get their facing and push them backwards, but someone could get clever and walk in backwards and so get pushed through the wall.
There may be a more elegant solution to this though.
The invisible collision ball/box should work for this, when properly scaled and rotated.
It should also work if you put an unbumpable creature there, scaled to the right size to block whatever you need. Use the invisible man/stalker creature for this.
It should also work if you put an unbumpable creature there, scaled to the right size to block whatever you need. Use the invisible man/stalker creature for this.
Where is the invisible stalker creature? I don't seem to have it...
anyway, usually I can move creatures, even petrified, just pushing them away. Wouldn' it be the same here?
You'd have to set them to be unbumpable in their properties. As for invisible stalker, hmm, maybe its a custom thing. Its just a creature without a model, or maybe its an invisible model. No idea actually. And not actually sure if scaling to be very wide will work. I'd test it with a regular model creature first and see if it works.
Otherwise i think you have to go with an on_enter script for the AoE.
ok, I am toying with creatures.
The fact is that they have a round collisione around them, that the npcs cannot walk
I'd need a rectangular collision for a wall...
====================================
at the same time, tried some aoe spell. Created a wall that use fear or turn effect on creatures that cross it, but in any case creatures can cross finally the wall.
Here's the deal with this.
1. The good news is that if you set an object to have dynamic collisions it works, you can spawn it via script and people won't be able to run through it.
2. The bad news is that collision bounds are the borders of a rectangle, if you spawn a dynamic collisions placeable on someone they end up being stuck inside.
If you spawn a walkable "visuals" placeable and an invisible collision box set to have a 0.0001 width you don't usually run in to this problem, but you will if the spell targets a creature exactly (ie. the placeable is perfectly boxed around them and they can't move). If you do this (the two placeables approach) and also make it so that there's a slightly randomized start position or so that you can't target objects then you can have an effectively zero probability of freezing someone in your wall.
Here's the deal with this.
1. The good news is that if you set an object to have dynamic collisions it works, you can spawn it via script and people won't be able to run through it.
2. The bad news is that collision bounds are the borders of a rectangle, if you spawn a dynamic collisions placeable on someone they end up being stuck inside.
If you spawn a walkable "visuals" placeable and an invisible collision box set to have a 0.0001 width you don't usually run in to this problem, but you will if the spell targets a creature exactly (ie. the placeable is perfectly boxed around them and they can't move). If you do this (the two placeables approach) and also make it so that there's a slightly randomized start position or so that you can't target objects then you can have an effectively zero probability of freezing someone in your wall.
Possibly you could cycle through each creature in the box's volume and jump each of them to their nearest safe spawning location. But that would depend on whether the subroutine takes collision boxes into consideration.
Here is a progress...
I place the item, a CollisionBall with a spirit trap barrier effect,
CreateObject(OBJECT_TYPE_PLACEABLE, "AA_WALL2", GetSpellTargetLocation());
and the collision seems to work and keeps the creatures away from me. However, I don't know yet how to destroy the barrier when the spell ends.
But I am also interested in using an Area of effect spell...so
To solve the locking in via spawning on a player, nwn2 has script functions to calculate safe locations It's part of how I did dynamic jumping.
how could I push back creatures that enter the area?
To destroy the collision ball you should just save it as a script parameter. Ie. when you call the "CreateObject" function you use it to initialize an object that you later apply "DestroyObject" to.
If you do what kamal_ is talking about there's no pushing back creatures that enter because they can't enter.
EffectAreaOfEffect can't be used for any of this.
To destroy the collision ball you should just save it as a script parameter. Ie. when you call the "CreateObject" function you use it to initialize an object that you later apply "DestroyObject" to.
got it!
object oWall1 = CreateObject(OBJECT_TYPE_PLACEABLE, "AA_WALL1", GetSpellTargetLocation()); object oWall2 = CreateObject(OBJECT_TYPE_PLACEABLE, "AA_WALL2", GetSpellTargetLocation()); effect eDisappear = EffectDisappear(); DelayCommand(10.0, ApplyEffectToObject( DURATION_TYPE_INSTANT, eDisappear, oWall1)); DelayCommand(10.0, ApplyEffectToObject( DURATION_TYPE_INSTANT, eDisappear, oWall2));
still waiting Kamal with more interesting solutions though.
Thank you all by the way. ![]()
how could I push back creatures that enter the area?
With an area effect you can have the On Enter script bounce the creature back outside. I use something similar to keep farm animals contained to their pen despite having an open gate.
With an area effect you can have the On Enter script bounce the creature back outside. I use something similar to keep farm animals contained to their pen despite having an open gate.
Can you show me the script?
I know how to immobilize/paralize them, but not how to push them back so that they can still move.
The script I use is based on a trigger region and it assumes movement is not blocked. You may need to resort to a ActionJumpToLocation call--perhaps use a visual effect on the target to graphically ease the jarring appearance. The hardest part is computing the nearest safe location outside the barrier.
The script I use is based on a trigger region and it assumes movement is not blocked. You may need to resort to a ActionJumpToLocation call--perhaps use a visual effect on the target to graphically ease the jarring appearance. The hardest part is computing the nearest safe location outside the barrier.
that goes beyond my reach. Anyway, I am satisfied with the results I got so far.
I can create energy wall/energy sphere
I can also make protection circles that can immobilize outsiders or protect me from them
I've been considering something similar after reading the Dresden Files since magic circles play a big part in those books. Would like to add some spells for protection from outsiders or keeping them contained... until you break the circle, then you are toast. ![]()