The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

> Protagonist Spell Only
Rabain
post Mar 8 2007, 04:56 PM
Post #1


GOD


Retired team member
Posts: 1728
Joined: 14-July 04
From: Ireland




I want to create a spell that only the protagonist can cast. If anyone else tries to cast it they will get a message.

So far I have tried casting a spell that sets a global. In a script if have the following:

CODE
IF
    Global("PConly","GLOBAL",1)
    Class(Player1,MAGE_ALL)
    IsActive(Player1)
THEN
    RESPONSE #100
        ActionOverride(Player1,ForceSpellRES("MyPConlyspell",Myself))         ActionOverride(Player1,DisplayStringHead(Myself,8538))
        SetGlobal("PConly","GLOBAL",2)
END


Ignore the DisplayStringHead..thats just for testing.

What is happening is that even if someone else in the party casts the first spell my Player1 starts casting "MyPConlySpell"

I can't seem to find a valid script command that specifies PC only.

I will also need a command that will work if someone not the PC casts the spell. I can use this in a second script block.
Go to the top of the page
 
Quote Post
 
Start new topic
Replies
Rabain
post Mar 9 2007, 10:55 AM
Post #2


GOD


Retired team member
Posts: 1728
Joined: 14-July 04
From: Ireland




I have 2 problems now...not too big thanks to your recommendations:

1. If I don't include the global in MY_SPELL nothing happens when Player1 casts MY_SPELL which is strange considering the script block I used from your post above should set it to 1 if it is 0.

2. If I do use the global (extended effect) in MY_SPELL then it works fine for Player1...however if any of the other Players(2-6) cast MY_SPELL then nothing happens for them (they don't get spell WTPFAMA1 cast) except the global in MY_SPELL is set to 2! This is even stranger because the only place the global gets set to 2 is in the block above when the ActionOverride applies spell WTPFAMA1 to Player1 (and that doesn't happen if Player2-6 casts it!). Also the message "Only the protagonist may cast this spell" doesn't get shown even though Player2-6 has cast MY_SPELL.

Problem 2 does have a workaround as the result of casting the second spell WTPFAMA1 involves further globals being set so I could possibly include an extra block to set the original global back to 0 if none of the other globals get set to 1 as they won't be if anyone other than Player1 casts MY_SPELL.
Go to the top of the page
 
Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 2nd November 2025 - 07:03 PM