Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Visual effect script : how and where to add ?

Page: 1 of 1
 Quanon
01-06-2008, 8:15 AM
#1
I'll clearify the title :

I would need somesort of visual effect , that blocks the PC and the party from going in to this corridor .

I was thinking something like a Force Wall or to use that "smoke and lightning " ground based effect , spread over a certain area (squarre ). ( When the PC still enters this effect it should do very heavy damage ! Almost like an instant kill . )

Thing is , this effect should end when you kill a hostile NPC . So that corridor becomes walkable again .

So where would I add the script , on the Hostile NPC itself ? Or on an other object ?

How would the script look like ?
 stoffe
01-06-2008, 9:02 AM
#2
I would need somesort of visual effect , that blocks the PC and the party from going in to this corridor .

I was thinking something like a Force Wall or to use that "smoke and lightning " ground based effect , spread over a certain area (squarre ). ( When the PC still enters this effect it should do very heavy damage ! Almost like an instant kill . )

Thing is , this effect should end when you kill a hostile NPC . So that corridor becomes walkable again .


Visual effects cannot, as far as I know, block a player since they are just pretty lights and particles. You could use a placeable with a bounding box/walkmesh, or a force field door, to block the player from moving through.

If you want a dangerous zone that doesn't block the player but harms them when they move through you could place a trigger in the location, and make its OnEnter script deal damage and debilitate the player. You could place a fog/cloud placeable on top of the trigger to give the player a visual clue that it might be unwise to go there. :)

The easiest way to remove barriers, open doors or disable dangerous triggers and destroy placeables would be in the OnDeath event script of the hostile NPC in question.
 Darth Payne
01-06-2008, 9:24 AM
#3
One thing to look into could be the temple shield on Rakata.

It prevents you from entering the temple.
 Quanon
01-06-2008, 9:58 AM
#4
The easiest way to remove barriers, open doors or disable dangerous triggers and destroy placeables would be in the OnDeath event script of the hostile NPC in question.

That means I just need to add a few extra lines to the standard OnDeath script ?

Wich Terminates the Trigger ( set in the .git file ? ) + plus the Placeable .

I'll have to go that way , because the force field doors won't fit that nicely in my temple .

So to some up things :

- I need a trigger wich defines the area where you get the damage
- The trigger is linked to a script wich deals an amount of damage per second
- Plus I just spawn a nice effect placable in the area of the trigger .

To end it all , I need to adjust the OnDeath script of my NPC .

EDIT : Would it be possible to use an effect out of the visualeffect 2DA , and to spread that effect along the difined area of the Trigger ?

Or would that get to heavy on the game , to repeat the effects time after time ...
 Darth Xander
01-06-2008, 11:02 AM
#5
May use an existing forcefield and reskin it if you can?
 stoffe
01-06-2008, 9:29 PM
#6
That means I just need to add a few extra lines to the standard OnDeath script ?

Make a new OnDeath script for the NPC instead, and set it in its UTC template.



- I need a trigger wich defines the area where you get the damage
- The trigger is linked to a script wich deals an amount of damage per second
- Plus I just spawn a nice effect placable in the area of the trigger .


Set an OnHeartbeat script on the trigger that applies damage to all characters present within the trigger continuously. Block out this part of the script with a global variable, that you set when the effect should go away and the area be safe to pass.

Put an effect-looking placeable on top of the trigger, like one of those toxic-looking red sith mist clouds used in the Dxun tomb, and give that placeable a unique tag so you can destroy it when the danger zone should deactivate.


EDIT : Would it be possible to use an effect out of the visualeffect 2DA , and to spread that effect along the difined area of the Trigger ?


If you can't find or make a suitable placeable you could make the triggers OnHeartbeat script display a visual effect on top of the trigger repeatedly.
Page: 1 of 1