Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Failure to confirm 0 input (Can't see me move northwest.)
New Topic New Poll Post Reply
Poster Message
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged
icon Failure to confirm 0 input (+1)  
I was trying to recreate Tendry's Grappling Hook from TSS, and ran into an unusual snag. I set up a system that waits for the player to teeter on a pit edge, then sets _MyScriptX to _O and checks the "Wait for Player to Input" command. And it works perfectly, except when I try to grapple northwest. Eventually, I tried adding a speech command directly after this check, and sure enough, it wasn't actually triggering.

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.

[Last edited by averagemoe at 01-09-2020 07:40 PM]
01-09-2020 at 07:40 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Failure to confirm 0 input (+1)  
My own testing shows that an entity which first sets _MyScriptX to a number and then waits for player to input northwest (which should be overwritten by that value) before talking, talks if the var is set to 1/2 and the player inputs north/northeast; and does not talk if it's set to 0 and the player moves northwest. It's possible more extensive testing would reveal that northwest corresponds to some random other number, though. I don't think I've ever actually used myscript with this particular command before, as all of the use-cases I've had for "wait for player to input" were either just for special command, or in case branchings that were simpler without using myscript.

____________________________
109th Skywatcher

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


[Last edited by Xindaris at 01-09-2020 10:13 PM]
01-09-2020 at 10:12 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1055
Registered: 06-23-2006
IP: Logged
icon Re: Failure to confirm 0 input (+3)  
Looking in the code, this isn't really a bug. While all the other movement commands map to their orientation, Northwest doesn't. If you look at the appropriate Game Constants, it turns out that command 0 is undefined, and it's command 11 that's northwest.

This is probably something that can't be changed, since it would break all the demos. Since breaking any of the demos is Not Allowed, that obviously presents a blocker. You'll just have to add a special case for NW movement.

____________________________
[Insert witty comment here]
Qzvlkx?
01-09-2020 at 10:49 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Failure to confirm 0 input (+1)  
Cool, thanks hyperme! I'll add this info to the myscript primer.

____________________________
109th Skywatcher

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

01-10-2020 at 12:42 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Failure to confirm 0 input (Can't see me move northwest.)
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.