Jump to content

SetToken and SendTrigger Question


Duality

Recommended Posts

Anyone know if the object parameter in SendTrigger() can be a Token set by SetTokenObject? I can't seem to make it work, but I just thought I'd check, since ActionOverride doesn't seem to work either.

 

This is the code I'm testing.

 

If

Trigger(1)

then

Response #100

//Blah blah

end

 

if

//blah blah

then

response #100

SendTrigger("caster", 1)

end

 

Where "caster" is a TokenObject set from another script.

Can you use SetTokenObject with ANY targeting or command feature other then a simple "attack"?

 

While I'm at it, is there anyway to use a string in something like "Spell(myself, WIZARD_FIREBALL)" but replacing the WIZARD_FIREBALL with some sort of variable? The problem is, I want to minimize the number of IF blocks in the mage script, but to do so, I would need to set some sort of indicator about which of the AoE spells were being cast. I tried SetGlobal("spellGlobal", "GLOBAL", 2304), then used the "spellGlobal" in the Spell command, but it didn't like it. It also didn't like a string or using SetTokenObject. (I'll try anything, even if I know it wont work.) :down:

Link to comment

Are you sure SetTokenObject() does what you think? I've never even looked at the token junk, but my understanding is that it simply override talk tokens; object would override the "global" token with the token for that object. SetTokenObject("GIRLBOY","Jaheira") would make <GIRLBOY> start spouting "girl" every time. Or something.

 

Wait for Avenger, I guess.

Link to comment
Well, i think this stuff requires research, the stuff i heard from Max and other sources was not clear even 3 years ago :down:

 

Max?

 

No wonder no one's been able to help me, no one knows. :down:

You might want to correct your scripting guide, I think that's where I got the idea :devil:

 

This whole mess is because I wanted to figure out a way to test for multiple enemies in a blast radius, so my scripts could effectively use AoE spells. But NOTHING I've tried has worked, other then an overly long Shout() sequence.

 

I'll keep testing, to date I have not managed to get SetTokenGlobal to do ANYTHING, let alone anything useful. Although, I've only tried to use it for targeting/action purposes.

 

Part of the problem is that the information is spread out over multiple forums and sites. While the iesdp information here tells you what all the triggers/actions etc. are, they don't tell you what works and what is just there to frustrate you.

 

Anyway, thanks for helping me look into this. It's been driving me nuts. :)

Link to comment

Archived

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

×
×
  • Create New...