Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : If... Set Player Weapon Off only detects scripting, not disarm tokens
New Topic New Poll Post Reply
Poster Message
Chaco
Level: Smitemaster
Rank Points: 3131
Registered: 10-06-2005
IP: Logged
icon If... Set Player Weapon Off only detects scripting, not disarm tokens (0)  
This came up in chat today in the context of "having an NPC detect what weapon the player is holding":

The script commands If... Set Player Weapon Staff, Pickaxe, Caber, etc. will return true if the player's weapon has been set to those weapons either by scripting setting that as their default weapon, or if (when the script's processing sequence occurs), the player is holding that weapon (e.g. from a weapon token).

However, If... Set Player Weapon Off only returns true if the player has been disarmed via scripting. It still returns false when the player has a weapon, but has been disarmed either by a disarm token or by oremites. This is inconsistent; I'd expect that condition to return true in those latter two cases.

There's currently no _Weapon variable (which I might draw up a separate feature request for), so this means there's no way to use the "set player weapon" command to detect whether the player is disarmed on any particular turn; the only way to do so is to manually update a variable whenever something hits a disarm token.

____________________________
Quick links to my stuff (in case you forgot where it was):
Click here to view the secret text


[Last edited by Chaco at 02-03-2017 06:55 PM]
02-03-2017 at 06:54 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smiter
Avatar
Rank Points: 492
Registered: 06-13-2015
IP: Logged
icon Re: If... Set Player Weapon Off only detects scripting, not disarm tokens (0)  
I agree this is a bug and should be fixed, but I will note the existence of a workaround in the vein of "testing for Player hastedness/invisibility" by having a separate character check for something relevant stepping on a disarm token and setting a variable to "yes" or "no", which the entity that's supposed to be detected armed/disarmed state checks.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 02-03-2017 10:03 PM]
02-03-2017 at 10:02 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
BenjiBenjamin123
Level: Roachling
Rank Points: 10
Registered: 01-29-2017
IP: Logged
icon Re: If... Set Player Weapon Off only detects scripting, not disarm tokens (0)  
quote:
Xindaris wrote:
I agree this is a bug and should be fixed, but I will note the existence of a workaround in the vein of "testing for Player hastedness/invisibility" by having a separate character check for something relevant stepping on a disarm token and setting a variable to "yes" or "no", which the entity that's supposed to be detected armed/disarmed state checks.


I agree with you ;)
02-08-2017 at 02:51 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : If... Set Player Weapon Off only detects scripting, not disarm tokens
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.