![](templates/Classic/images/spacer.gif) |
Gintonic Beginner
Joined: 04 May 2018 Posts: 12
|
Posted: Thu Feb 17, 2022 11:51 am
OnWalkEnd does not fire, if the #WALK is shorter than 2 rooms. |
Hi everyone,
I have an issue with the OnWalkEnd event, that I cant figure out.
Whenever the WALK is one room, ie. 1 north or south etc. the OnWalkEnd event does not fire.
I'm not sure if this is intended or not. The help file states, OnWalkEnd runs at the end of a speedwalk.
Is there a reason 1 room #WALKS are not considered speedwalks? or what causing this issue?
Regards,
Gintonic |
|
|
![](templates/Classic/images/spacer.gif) |
hpoonis2010 Adept
![](images/avatars/1873888255ff6db71d8987.jpg)
Joined: 18 Jun 2019 Posts: 279
|
Posted: Thu Feb 17, 2022 3:50 pm |
I am not sure you'll get a satisfactory answer from a reliable source.
In terms of code, it really makes no sense to register a move of one room as a speedwalk. It is likely that 2 steps is a minimum. I suppose you could code to get the speedwalk path and test the length. If the length=1 then do an OnEnter event, otherwise just do the onwalkend event. |
|
|
![](templates/Classic/images/spacer.gif) |
Gintonic Beginner
Joined: 04 May 2018 Posts: 12
|
Posted: Thu Feb 17, 2022 11:14 pm |
ok, so how do you go about testing the speedwalk path. I just went trough the built in Help file, but didnt find anything relating speedwalking lenght
|
|
|
![](templates/Classic/images/spacer.gif) |
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Sun Feb 20, 2022 9:29 pm |
You can return the path as a string rather than executing it using %walk(). If you save it as a variable, you can then manipulate and check it using normal string functions.
|
|
|
![](templates/Classic/images/spacer.gif) |
Gintonic Beginner
Joined: 04 May 2018 Posts: 12
|
Posted: Mon Feb 21, 2022 9:16 am |
yeah... i dont use path, I let the mapper do its thing. is just tell the room number and the name to attack. I went through the whole help file, i don't think hpoonis proposal is valid, can't seem, to find any function or command that evaluates speedwalk prior the walk command.
personally i think the OnWalkEnd should work every time you use the WALK command, regardless the length of the speedwalk. If I want to move just 1 room I'll use direction instead of the WALK command. but anyway,
i managed to write a half solution, but it wouldve been much easier with a working onwalkend event |
|
|
![](templates/Classic/images/spacer.gif) |
|
|