markyrocks Posted August 24, 2018 Author Share Posted August 24, 2018 if bool (if it's true) ; things happen.I understand how boolean variables operate and are applied in conditional statements, how they're evaluated ect. Thanks for the reply. I'm asking about the logic of that particular function isnearplayer(). The example shows using the ! Operator b4 a variable in the function call I'm wondering if If( !ref.isnearplayer() )== true ;if ref not near player If ref.isnearplayee() ==true ; if ref is near player Link to comment Share on other sites More sharing options...
Reneer Posted August 24, 2018 Share Posted August 24, 2018 Ref.IsNearPlayer() will return true if the reference is less than X units (I think it is 1,000) from the player. If you add the ! operator it reverses the outcome, so !Ref.IsNearPlayer() will return false if the reference is less than X units away. Link to comment Share on other sites More sharing options...
SKKmods Posted August 24, 2018 Share Posted August 24, 2018 I prefer the bool == true/false thing because it's less confusing. ^THIS fully qualified explicit statements makes code so much easier to maintain for self and others. If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there. Link to comment Share on other sites More sharing options...
Reneer Posted August 24, 2018 Share Posted August 24, 2018 (edited) I prefer the bool == true/false thing because it's less confusing. ^THIS fully qualified explicit statements makes code so much easier to maintain for self and others. If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there. I am always so happy I first learned to code in C / C++ and that the instructors pushed us to to make our statements fully explicit. I can go back and look at old code and figure it out much more easily than if I was doing fancy shorthand. Edited August 24, 2018 by Reneer Link to comment Share on other sites More sharing options...
markyrocks Posted August 25, 2018 Author Share Posted August 25, 2018 (edited) I prefer the bool == true/false thing because it's less confusing. ^THIS fully qualified explicit statements makes code so much easier to maintain for self and others. If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there. I am always so happy I first learned to code in C / C++ and that the instructors pushed us to to make our statements fully explicit. I can go back and look at old code and figure it out much more easily than if I was doing fancy shorthand. lol you guys... don't point the finger at me i just copied the example. Obviously i was slightly confused or i wouldn't have asked. They can't make the examples like idiot proof.... that would be to easy. They don't want mediocre coders playing with this stuff. I did however sign up for the wiki bc i am going to change some things as im learning bc it is truly ridiculous. I encourage you all to do the same. If your looking at something on there and its total crap, explain it so a moron could understand. Probably be 3x as many modders in this game if the language was explained better. I literally spent like 5 hours trying to get notepad++ up and running with the papyrus compiler bc the wiki had errors in it ect. most people would have quite and just called it broken.... I fixed it and i edited the wiki. I figured after all that effort i would help someone else out. Got a crash course in .bat files and cmd prompts while i was at it.... anyone need a bat file? im your guy Edited August 25, 2018 by markyrocks Link to comment Share on other sites More sharing options...
Recommended Posts