A Question About Code
JediMindTrix
Member Posts: 305
Hello!
Just curious if anyone can tell me if I interpreted this code correctly or not:
Just curious if anyone can tell me if I interpreted this code correctly or not:
IF
OR(2)
!Allegiance(LastSeenBy(Myself),GOODCUTOFF) //The allegiance of the last person seen is not Goodcutoff
!See([GOODCUTOFF]) //I don't see Goodcutoff
Range(Player1,20) //If a player 1 is within 20 feet
THEN
RESPONSE #100
RandomWalkContinuous() //randomwalk everywhere
END
IF
OR(2)
!Allegiance(LastSeenBy(Myself),GOODCUTOFF) //The allegiance of the last person seen is not Goodcutoff
!See([GOODCUTOFF]) //I don't see Goodcutoff
!Range(Player1,20) //If player 1 is not within 20 feet
THEN
RESPONSE #100
MoveToObject(Player1) //Charge for Player 1
END
0
Comments
OR(2) is true if at least one of the following two statements is true.
Generally the coders (or program viewers) use an indentation system to make the code easier to read.
For instance:
IF OR(2) !Allegiance(LastSeenBy(Myself),GOODCUTOFF) //If The allegiance of the last person seen is not Goodcutoff !See([GOODCUTOFF]) //Or I don't see Goodcutoff Range(Player1,20) //And player 1 is within 20 feet THEN RESPONSE #100 RandomWalkContinuous() //Then I randomwalk everywhere END
EDIT: I use indentations too, I pulled the original directly from an Ascension script.
IF
-The allegiance of the last creature I saw (creature tagged as seen) is not good OR I see no one good
-Player1 is (not) within a 20 foot radius
THEN
etc...