Jump to content

How do I lift invisibility?


Kulyok

Recommended Posts

I have an encounter where PC is invisible. However, upon exiting the conversation, a battle starts, and the enemies should see the PC(because PC interjected into conversation) - otherwise they just stand there doing nothing, which sucks.

 

ApplySpell(Player1,WIZARD_DISPEL_MAGIC) doesn't always work, and looks like a spell, whereas I just want PC's invisibility lifted without any special effects, just like in a dead magic zone(but it's SoA-only install, so dead magic zones might not work).

 

So, what do I do, and which command is it?

Link to comment

Probably there are more elegant ways, but:

 

1) you could make an edited version of Dispel Magic. Remove the DisplayString and Play3DEffect effect (then it won't look like a spell), and set Ignore Level to "Yes" in the DispelEffects effect (then it will work 100% of the time). Of course, it will dispel all other effects on the player too, which may not be what you want.

 

2) You could make a new spell called "Visible" or "Becomes visible" which does nothing and has casting time zero but has the "breaks invisibility" flag set. Then tell the PC to cast it (via ActionOverride: SpellNoDec or ForceSpell). The text :"<CHARNAME>: Visible" will display, and the PC's invisibility will break. (I haven't tested this, I'm just theorising).

 

[Edit: yes, there was a more elegant way!]

Link to comment

Aha. So such an effect doesn't exist in the original game, and it's "dispel or create a new one".

 

A new spell seems like the most elegant solution, but the text message doesn't sound good, and what's more, I rather prefer to use existing resources, just not to mess with anything.

 

I guess I'll go with FORCE_DISPEL_MAGIC for now - after all, when the party arrives to Saradush, they are force-dispelled, too, so it's not completely out of line. Thanks!

Link to comment

There's also a ToB spell (JWTRUE, I think) that uses detect invis to remove PC invisibility (it's weird how they did it, unless that's really the cure invis opcode). See the cutscene for teleporting to Saradush for usage.

Link to comment
' date='Jul 9 2007, 11:18 PM' post='91519']

It means, you can actually create new spells.

The cure invisibility opcode is: 47.

 

Is there any difference between Effect #47 and Effect #116? Both are listed as "Cure Invisibility" by IEDSP.

 

jwtrue uses the #116 opcode.

 

I'll check the code to determine what's the difference between these opcodes.

Link to comment

Wow, #47 and #116 are almost identical.

There is some difference, but both handles nondetection, the invisibility state bits and remove the invisibility effect.

The machine level instructions are the same, just some constants are different.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...