Aller au contenu

Photo

can a summoned wall have collision?


  • Veuillez vous connecter pour répondre
20 réponses à ce sujet

#1
Antares

Antares
  • Members
  • 51 messages

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

 

NWN2_SS_071414_120747.jpg

 

would it be possible?



#2
4760

4760
  • Members
  • 1 212 messages

I guess it could be done using a stock placeable and changing the texture (either by MDBCloner or using a dedicated visual effect file).



#3
Loki_999

Loki_999
  • Members
  • 430 messages

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.



#4
rjshae

rjshae
  • Members
  • 4 497 messages

The invisible collision ball/box should work for this, when properly scaled and rotated.



#5
Loki_999

Loki_999
  • Members
  • 430 messages

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.


  • Antares aime ceci

#6
Antares

Antares
  • Members
  • 51 messages


The invisible collision ball/box should work for this, when properly scaled and rotated.

 

I tried to place a wall and the invisible box, but I can still pass through

 

NWN2_SS_072314_115837.jpg



#7
Antares

Antares
  • Members
  • 51 messages

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?



#8
Loki_999

Loki_999
  • Members
  • 430 messages

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.



#9
Antares

Antares
  • Members
  • 51 messages

ok, I am toying with creatures.

The fact is that they have a round collisione around them, that the npcs cannot walk

NWN2_SS_072314_133620.jpg

 

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.



#10
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

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.



#11
rjshae

rjshae
  • Members
  • 4 497 messages

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.



#12
kamal_

kamal_
  • Members
  • 5 254 messages
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.

#13
Antares

Antares
  • Members
  • 51 messages

Here is a progress...

NWN2_SS_072314_171149.jpg

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?



#14
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

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.


  • Antares aime ceci

#15
Antares

Antares
  • Members
  • 51 messages

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


  • Loki_999 aime ceci

#16
kamal_

kamal_
  • Members
  • 5 254 messages

How about adapting this?

http://neverwinterva...uffet-staff-ram



#17
rjshae

rjshae
  • Members
  • 4 497 messages
 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.



#18
Antares

Antares
  • Members
  • 51 messages

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.



#19
rjshae

rjshae
  • Members
  • 4 497 messages

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.


  • Antares aime ceci

#20
Antares

Antares
  • Members
  • 51 messages

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

 

 

NWN2_SS_072614_215727.jpg

 

I can also make protection circles that can immobilize outsiders or protect me from them

NWN2_SS_072614_215830.jpg


  • rjshae aime ceci

#21
Loki_999

Loki_999
  • Members
  • 430 messages

 

I can also make protection circles that can immobilize outsiders or protect me from them

NWN2_SS_072614_215830.jpg

 

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