Scripting a Trigger of specific shape?
#1
Posté 28 juillet 2011 - 12:22
I have made an Incantation system for my PW.
It works on the principle of Toggle Incantation mode on, Speak a specific Incantation phrase, and then it will automagically select the relevant custom spell.
I am using nwnx_resman, so all the spells are modules which can be dropped into the module, without requiring a reset.
However, Phase 2 of the system, is the 'Ritual' system.
The Holy Trinity I am creating is
Incantations = Spells you launch and target at objects or locations
Rituals = Spells that require reagents, and / or preparation and longer incantations
Chants = Remain Motionless, and chant, causing specific buffs/debuffs to occur, at intervals to all within ear-shot.
Chants will be easy...
However...
For Rituals, I want to for some Rituals..
Create a Trigger, that fires a specific script, on enter, and another on exit etc
However, the trigger needs to be Circle in shape.
If I remember correctly, spawning a trigger, makes it square, and fixed to a specific size.
nwnx_funcs for windows, does have functionality that allows you to set trap geometry.
My Question -
Is such a thing possible for Triggers, or am I best just using traps, and changing the scripts for the trap to be whatever is required?
The idea for rituals, is something like
1. Your being attacked by hordes of the undead.
2. You prepare the ritual while your team mates protect you.
3. You finish the ritual, and then a large circle forms around you (using the pentagrams and summoning circles include script)
4. The trigger/trap will be inside the circle. (same shape and size)
5. If an ally enters - they are safe
6. If an enemy undead enters, they get feared and/or damaged.
The circle would fade after 60 seconds, or when the caster leaves the circle, whichever comes first.
Thoughts?
#2
Posté 28 juillet 2011 - 03:34
#3
Posté 28 juillet 2011 - 06:00
Baaleos wrote...
However, the trigger needs to be Circle in shape.
If I remember correctly, spawning a trigger, makes it square, and fixed to a specific size.
nwnx_funcs for windows, does have functionality that allows you to set trap geometry.
My Question -
Is such a thing possible for Triggers, or am I best just using traps, and changing the scripts for the trap to be whatever is required?
Hello.
Triggers (as in objects of type OBJECT_TYPE_TRIGGER) can not be spawned, nor cloned, nor copied, nor repositioned during play.
This major shortcoming is a sad reality. Could we spawn, or at the very least _copy_, triggers it would open up many interesting possibilities (traps do not count).
The suggestion to use an Area Of Effect object is very good.
-fox
#4
Posté 28 juillet 2011 - 09:31
Also - while traps and triggers are slightly different, there are functions to allow the spawning of traps.
If needed, I could swap a trigger for a trap, and make it only perform the designated function on the intended targets
#5
Posté 28 juillet 2011 - 09:39
this gives you the ability to use code in trap scripts. There is some info on nwnx forums link: http://www.nwnx.org/phpBB2/ they would be better at telling if the shape of the trap is possible. I haven't played with it that much but it seems the plugin is quite helpful from what I have read
#6
Posté 28 juillet 2011 - 09:41
#7
Posté 28 juillet 2011 - 10:17
no vfx_persistent.2da is serverside with exception for collumn DurationVFX and probably also other collums where is stored the vfx model etc.Baaleos wrote...
To create a new AoE - would this require client side files?
However I really dont understand why you need to "spawn" the trigger? Cant just be it the way that the ritual must be done at altar placeable and then there will be invisible trigger of fixed size (painted in toolset) to handle leaving the ritual subarea?
#8
Posté 28 juillet 2011 - 10:45
The idea for rituals, is something like
1. Your being attacked by hordes of the undead.
2. You prepare the ritual while your team mates protect you.
3. You finish the ritual, and then a large circle forms around you (using the pentagrams and summoning circles include script)
4. The trigger/trap will be inside the circle. (same shape and size)
5. If an ally enters - they are safe
6. If an enemy undead enters, they get feared and/or damaged.
The circle would fade after 60 seconds, or when the caster leaves the circle, whichever comes first.
and then you send it back/destroy copy. I just cant rem if we can copy trigers in nwn code or if thats a nwnx plugin
#9
Posté 28 juillet 2011 - 11:11
#10
Posté 29 juillet 2011 - 01:35
Greyfort wrote...
Shadow brought up a good point, a trigger of fixed size (painted in toolset, in area players will never be) Would allow you to copy/ that trigger to location of...
The idea for rituals, is something like
1. Your being attacked by hordes of the undead.
2. You prepare the ritual while your team mates protect you.
3. You finish the ritual, and then a large circle forms around you (using the pentagrams and summoning circles include script)
4. The trigger/trap will be inside the circle. (same shape and size)
5. If an ally enters - they are safe
6. If an enemy undead enters, they get feared and/or damaged.
The circle would fade after 60 seconds, or when the caster leaves the circle, whichever comes first.
and then you send it back/destroy copy. I just cant rem if we can copy trigers in nwn code or if thats a nwnx plugin
That would have to be a NWNX function. Even copying/moving I think will prove a headache though. Triggers are "centered" based on where they stop/start. IE, when you draw the trigger in the toolset, the point you first click and where the last leg of the trigger rejoins to close the loop is the triggers starting point. Any scripts using get nearest, get first, etc ... will reference this location. So (its just a guess), I suspect that any means of moving a trigger will use that same point as it's center and cause odd placement of the trigger when moved.





Retour en haut







