Thanks for that explanation of the buffer-command :) I was thinking that it might have an automatical output 😅
I figured out that the Safari-Pedometer in the CFRU-Doc might be a solution. So, I made those 2 Lv2-Scripts:
Script A - Step Counter Activation
Script B - Check Results
The problem is that I get a messagebox with weird characters. And no, I haven't forgotten to set #raw word 0xFFFF to 0x0 in both Level2-Scripts.
I suppose the setflag 0x921, because I hadn't set it before, but there the Script wouldn't execute after 50 steps or more.
I have really no idea what causes this problems ... Has the Script A to be a different Level-Script?
Thanks for the help :)
Ok, now that I've actually taken the time to look, yeah I see several problems.
1. set flag 0x921 you're setting a pedometer
2. then you (not blaming you for this one, I see the cfru guide literally says do it that way) set var 8004 using a decimal value and not a hex. (needs the 0x0)
2.a. ok so I've never seen a last result use a non-hex value I'm just assuming the guide is wrong here, but he literally has the value written exactly the same about 3 times, so I just don't know. but check the actual safari zone code in the game if you can to confirm, but I think you should use the hex value for 50 which is 0x32.
3. special 89, after setting a pedometer, you set another pedometer, (So you could pedometer, while you pedometer. sorry bad joke)
4. special 0x81, either I'm understanding it wrong or this is another guide typ0, it says setting to 0, i.e 0x0 will remove any walking script.
So the default shouldn't be load pointer 0x0 pointer message I'd think it would be 0x1. (actually I have no idea, that thing is written/explained very badly)
4.1 But either way its not really needed (I think) because getting the result of your cfru pedometer is the job of special 0x8a.
5. setvar 0x8004 0x2 '-- Tells the special 0x8A that the Pedometer is active, Special 0x8a is no where in your code, so this does nothing.
6. Ok I see what you were trying to do but....you mixed specials for 2 separate pedometers together, specials aren't like regular scripts that you can mix and match with different things for different effect, specials have to be called and used in the specific way that they're meant to, or they just won't work.
special2 LAST_RESULT 0x88 'Get current pedometer
Compare LAST_RESULT 50
If 0x3 goto @Continue
setvar 0x8004 50 'Pedometer can only reach 50 steps
Special 0x89 'Set the safari step counter to 50
So replacing the top line with the other pedometer
using the second line set value for the safari pedometer/which isn't at all apart of the syntax for the cfru pedometer
Just won't work.
#org @PedometerScript
setvar 0x8004 0x2 '-- Tells the special 0x8A that the Pedometer is active
special2 LASTRESULT 0x88 '-- Get current pedometer
compare LASTRESULT 50
if 0x4 goto @MaxStepsReached
releaseall
end
Same problem as stated above.
7. setting special 0x88 before and separate from 0x89
This one was very confusing and I had to stare at it in the cfru guide for a while before it started making sense. 0x88 gets the value of the safari pedometer, but special 0x89 is what actually sets the safari pedometer and its value. Didn't make sense, until I realized its because these two are always meant to be used together in one script. You should never have special 0x88 byitself.
that's the portion that checks your safari steps and I believe displays it.
So an entire safari script should be
special2 LAST_RESULT 0x88 'Get current pedometer
Compare LAST_RESULT 50
If 0x3 goto @Continue
if 0x4 goto @OverFifty
setvar 0x8004 50 'Pedometer can only reach 50 steps
Special 0x89 'Set the safari step counter to 50
actually no that doesn't make sense to me, either.
Like if the script was written that way, I'd assume it would just never set the pedometer unless its supposed to loop? But even that doesn't work because it would
reset the safari counter probably each step and never get to 50...
Ok I'm assuming the example script is just completely wrong at this point.
Just check the safari zone actual script and lvl scripts.
But I'd assume it should be setvar 0x8004 0x32 and then special 0x89 and then put special 0x88 in another script with the compare and two if statements to pull results.
Alright that's all I could get out of that. oh and also I don't know if the safari zone pedometer is locked to one map, or can be used anywhere, but still you should just use the regular cfru pedometer. You can't mix the implementations together.