Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Scripting question (about "If" conditions)
New Topic New Poll Post Reply
Poster Message
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Scripting question (0)  
Can "set appearance" and "face direction" not be used as conditions to see whether the NPC has the relevant appearance or is facing the relevant direction? (If not, should I feature-request it, or is there a good reason why not?)
04-19-2009 at 09:10 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1304
Registered: 06-14-2005
IP: Logged
icon Re: Scripting question (0)  
I'm pretty sure that they can. I'll check right now.
Or not. I seem not to have DROD with me. :(

[Last edited by Someone Else at 04-19-2009 03:11 PM]
04-19-2009 at 03:10 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
agaricus5
Level: Smitemaster
Rank Points: 1838
Registered: 02-04-2003
IP: Logged
icon Re: Scripting question (+1)  
Tahnan wrote:
Can "set appearance" and "face direction" not be used as conditions to see whether the NPC has the relevant appearance or is facing the relevant direction? (If not, should I feature-request it, or is there a good reason why not?)
No, they can't be. What happens is that the NPC attempts to execute the command, and will return true/false if said command is executed properly.

You can, however, use this behaviour to determine if a character is blocked from moving. Put a move (relative direction) command after an if statement, and the character will attempt to move in that direction. If the NPC is blocked by something from performing the intended movement, it returns false and doesn't execute anything in the if-block. However, as moving takes up 1 move, the if-block commands will not execute until the move after.

____________________________
Resident Medic/Mycologist

[Last edited by agaricus5 at 04-19-2009 06:28 PM]
04-19-2009 at 06:26 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Scripting question (0)  
Oh! I see. That makes perfect sense. It's frustrating, but it makes perfect sense.
04-19-2009 at 08:57 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Scripting question (0)  
When we get all those RPG variables ported into classic DROD, though, we'll have the _MyO var to check orientation. But as for right now, I don't think there's any easy way to do it.

As for appearance... that would still be an issue. You will need to have a separate block of code written for each appearance, making it switch to the appropriate label whenever it changes appearance.


By the way, I just requested a system var for appearance on the RPG FR board. But regardless of whether or not it makes it into RPG, I don't think we'll be seeing it in classic DROD any time soon.

____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 04-20-2009 12:00 AM]
04-19-2009 at 11:26 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Scripting question (about "If" conditions)
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.