Aller au contenu

Photo

Wynne barrier - how is it done?


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

#1
0x30A88

0x30A88
  • Members
  • 1 081 messages
Last time I got no proper answer to this question. I was told to use the search engine and to no avail. I have paused the project for a while and am resuming it as school is calming down a bit. I wonder how can I...

1. get a conteniusly firing script that checks for the deaths of two creatures - of different teams?
2. get how to have a barrier - as in the mage tower, that could be destroyed if said creatures are dead?

I have looked through all placeable variations - tedius as that was -, but found no barrier.

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
I haven't examined the area but I suspect it is done through a VFX. To prevent players crossing it, you could keep invisible placeables around it.



I don't know why you'd need a continuous check on the deaths of the two creatures. If you've put them in their own teams, you should be able to handle EVENT_TYPE_TEAM_DESTROYED in the area script and remove the VFX and destroy the invisible placeables.

#3
0x30A88

0x30A88
  • Members
  • 1 081 messages
The problem is - both of the creatures have a set of minions on their team, which is called upon when combat is initiated. Thus, both of the creatures are of their own team, i.e. two teams.



How can I spawn a toggleable VFX, and how do I destroy it?

#4
TimelordDC

TimelordDC
  • Members
  • 923 messages
Even if they have their own minions, they can still be in a different team. For example, if you are using UT_TeamAppears to spawn them in for combat, you can do that separately for the 'boss' too.

If it is more complicated than that, some pseudo-code (or actual code if it is not too big) will help.



Continuous checks typically require a heartbeat script with a very short duration and in addition to the memory required (and the delay that might come in during combat processing), is not really elegant ;)



For spawning VFX, you could use ApplyEffectAtLocation (or some such thing - don't have Toolset open right now; but just filter the function list for Effect). You could also open up the relevant area in the OC and see how it is done.

#5
0x30A88

0x30A88
  • Members
  • 1 081 messages
I made a quick-script for minion-spawning. It has reads the boss' team ID and spawn minions under the same team. So I can use it for more creatures without having to make new scripts.



Perhaps having a descrtuction script that checks a flag called barrier_creature_1 and if it sees that falg as true, check the other, and then have a script doing the barrier removal when the second one is fired. And how can I remove a spawned effect?

#6
TimelordDC

TimelordDC
  • Members
  • 923 messages
The alternative is to use a custom creature script for the bosses and handle EVENT_TYPE_DEATH to set a plot flag. Once both plot flags are set, remove the VFX.



For removing the effect, RemoveEffect or something similar should be there.

#7
0x30A88

0x30A88
  • Members
  • 1 081 messages
How do I refer to the created effect and how do I create one I can later refer to?

EDIT: found the script for the barrier placable. Seems like it does all the work. Going to study it futher to see if what I can do to make it work with my mod.
EDIT 2: It has custom events, this is a part of the placeable core for the barrier. Custom event 2 seems to be triggered by the first, but how is the first one triggered? And why does it delay the disabling?

...
        case EVENT_TYPE_CUSTOM_EVENT_01:
        {
            RemoveVisualEffect(OBJECT_SELF, MAGIC_BARRIER_VFX);
            DelayEvent(0.4, OBJECT_SELF, Event(EVENT_TYPE_CUSTOM_EVENT_02));
            break;
        }

        case EVENT_TYPE_CUSTOM_EVENT_02:
        {
            WR_SetObjectActive(OBJECT_SELF, FALSE, 1);
            break;
        }
...

Modifié par Gisle Aune, 18 janvier 2011 - 08:23 .


#8
Proleric

Proleric
  • Members
  • 2 343 messages
The plot script cir000pt_main has this:

           case WYNNE_BARRIER_REMOVED:         // H_WYNNE
                                                // Wynne removes the barrier she set up
            {
                //Wynne removes the barrier she set up
                object oBarrier = GetObjectByTag(CIR_IP_WYNNE_BARRIER);
                DelayEvent(0.5, oBarrier, Event(EVENT_TYPE_CUSTOM_EVENT_01)); //Get the barrier to disable itself
                break;
            }

Presumably it's done by setting this plot flag in conversation / cutscene.

I imagine the delays are all dramatic finesse, i.e. it's more impressive if the spell takes time to work.

Modifié par Proleric1, 19 janvier 2011 - 07:37 .


#9
0x30A88

0x30A88
  • Members
  • 1 081 messages
So i just set up a placeable with the script like there is in the Tower, and uses the DelayEvent to call custom_01 when I have those two creatures dead, i.e. after the plot thing I mentioned in an earlier post in this thread.