Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Mad Poster
Original Poster
#1 Old 17th Feb 2018 at 5:10 PM Last edited by simmer22 : 17th Feb 2018 at 5:22 PM.
Default Deleting BHAV entries/strings safely
I've got a few objects I've cloned from other objects in the same set, and noticed a little too late that I'd made the originals AL shiftable - but a few of the new objects aren't meant to be.

How would I go about deleting it safely, without causing any weirdness in the BHAV?

I've tried "delete", "Pescado's delete" and "delete to end", but they leave a question mark in the place of the "T" (true) in the list, and I've got no clue if that's safe...

I know I can remake the object, but I'd rather know how to fix it so I don't have to remake so many files.
Screenshots
Advertisement
just a girl
#2 Old 17th Feb 2018 at 8:15 PM
Could you please show us a screenshot? Question marks are not good, unless a node that has them is unlinked (=won't be executed). Everything should have a proper continuation and ending in BHAVs, and a question mark means that the code doesn't know where do you want it to go after that node.

UPD. You added the screenshot while I was typing.

OK. So. Select node 3 and change True Target to 'Return TRUE' (instead of 4). Then node 4 becomes unlinked and you can delete it either by Delete or by Pescado's delete, won't matter in this case. You can even leave it there (though it won't be tidy). What's important is the BHAV will now return true - like inits should.
Mad Poster
Original Poster
#3 Old 18th Feb 2018 at 2:45 AM
Looks like it worked. Thanks :D

(Was going to say it didn't work, but realized I'd done the "false target" instead of the "true target"... )
just a girl
#4 Old 18th Feb 2018 at 3:35 AM
It may help to look at BHAVs like corridors with turns - labyrinth of some sort. Inside every node, the game solves equation / performs whatever it's instructed in that node and the result is either true or false (like yes or no). Targets indicate where you go next.
So, you start at 0 and walk your way to exit / end. The end of BHAV is when you reach 'Return True' or 'Return False'. Well, I should say, it's a proper end. If you reach a turn that points to 'Error' or non-existent node ('?'), your BHAV will end too, but with an error (dead end, you lose). There may be multiple ends and they may be in different parts of the 'labyrinth'. The paths leading to those ends may be different as well - depends on where the nodes point.
When you deal with bhavs, you should follow the arrows and make sure that the path is want you want it to be, and that it doesn't lead to error-traps or eternal loops.
As for Init functions, they should always Return True in the end. Init is like birth of an object: if it fails to init, it doesn't live.
Back to top