er...FakeEffectExpiryCheck(O:Object*,I:Ticks*)

Started by lijing_hi, April 08, 2006, 05:14:54 AM

Previous topic - Next topic

lijing_hi

I've used it in my script, and use a 150000 as the second parameter. But it doesn't work in game...I've tried other numbers, but the same.

How could I make it work? Or it's broken?

igi

It worked fine for me when I tested it to figure out what it should be doing.

lijing_hi

But why it doesn't work for me...

Could you please tell me how to use it correctly?

igi

There's not much I can say:
The action obviously goes in a script, which has to be assigned to some something. The first parameter specifies an object, the second a time.

lijing_hi

er...I thought I could use it to remove all effects from PC...

Just like this:

IF
   IsOverMe([ANYONE])
THEN
   RESPONSE #100
      FakeEffectExpiryCheck(LastTrigger,150000)
END

Is there something wrong?

Avenger_teambg

It removes effects that have a duration remaining less than the time specified.
It won't remove permanent or 'white equipped' effects.
At least, that's what it supposed to do.
I'm not sure IsOverMe sets LastTrigger, try Entered
See GemRB !

lijing_hi

I've tried, but the same...

IsOverMe() does set a LastTrigger, I've tested it. And Entered() has a problem; if two creature enter the region the same time, there is only one could be returned. This's not what I want...

Use the block posted above I've made a test like this:
At first, one charater casted haste. Then, another with the effect haste moved to the trigger region. But nothing happened. If I use some spell just like dispel instead of that action, it does work with effect haste removed. So I dont know what's wrong with it...

Avenger_teambg

Well, if it is a dispel magic trap, then you better apply a strong dispel effect anyway.
Like the one in the beholder blast.

I'll test this action later, but considering how it supposed to work, it is more like a 'local time anomaly' than a dispelling effect.
See GemRB !

devSin

I briefly tested it back when I went through all the actions. It worked, although there was a noticeable delay before the effects actually expired.

If the number really is AI updates, you might just try a bigger number.

lijing_hi

Delay? Hmm...I'll try more.

The number, I've tried 1500000, the same. But I didn't notice there is a delay...I'll try it.

devSin

The delay would be very small (a second or less). It's "noticeable" simply because it isn't immediate; if it didn't work, it's not going to work.

I'm fairly certain IsOverMe() sets LastTrigger (otherwise, there'd be no way to reference the object returned). Have you tried just testing with different objects (e.g., Player1 or "Imoen") to see if even that works? The action is only used once in the default scripts (that I know of), so it wouldn't be surprising if it wasn't fully functional.

If you just want it to dispel, you could use one of the special dispel spells (I think FORCE_DISPEL_MAGIC or DISPEL_NO_SAVE), or create your own.

Avenger_teambg

Quote from: devSinThe delay would be very small (a second or less). It's "noticeable" simply because it isn't immediate; if it didn't work, it's not going to work.

I'm fairly certain IsOverMe() sets LastTrigger (otherwise, there'd be no way to reference the object returned). Have you tried just testing with different objects (e.g., Player1 or "Imoen") to see if even that works? The action is only used once in the default scripts (that I know of), so it wouldn't be surprising if it wasn't fully functional.

If you just want it to dispel, you could use one of the special dispel spells (I think FORCE_DISPEL_MAGIC or DISPEL_NO_SAVE), or create your own.
Well, it could be that isoverme changes lastrigger, but it is not true it is required.
Like:

If
 isoverme("imoen")
then
response #100
displaystringhead("imoen", "blah")
end
See GemRB !

devSin

Don't cheat. Of course it isn't required (inasmuch as it isn't required for any other trigger that sets LastTrigger).

IF
 Entered("Imoen")
THEN
 RESPONSE #100
   Kill("Imoen")
END

Entered() must not set LastTrigger either! :P

lijing_hi

Well, I give up...

I've tried such a block:

IF
   OR(2)
      Entered(Player1)
      IsOverMe(Player1)
THEN
   RESPONSE #100
//      ForceSpellPointRES("TR0002B",[989.579])
      DisplayStringHead(Player1,6365)
      FakeEffectExpiryCheck(Player1,150000000)
END

(Well, "TR0002B" is a strong dispel spell my own. )
When Player1 entered the trigger region, sting 6365 displayed, that's the only difference...
The action doesn't work for me, at least doesn't work for me as my wish...

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Shortcuts: ALT+S post or ALT+P preview