zone problems
Posted: 26 May 2012, 16:26
Well im stumped on this one... For some reason IS_CHAR_IN_ZONE(char, zonename) almost NEVER works, all it does is if called during an IF statement succesfully crashes the freaking game.
Its a redicuously weird or specific command, it gone and did the following stuff:
Only desired to function in a NOT statement after a non-NOT statement;
^ Failed to work once either of them where alone without eachother...
Was still uncooperative after putting in a intentional never-reached IF statement with this AND having both IF() and IF(NOT()) statements.
From what i gather that was all script specific. Below here's the zone-specific stuff:
It seems to HATE being in another zone and utterly refused to work as a local navigation zone instead of a regular navigation zone.
The only time it actually worked on me was calling IF(NOT(IS_CHAR_IN_ZONE(Player1, Slums))) while the actual zone Slums was navigagion, not sharing any space with other zones and bordering to some other zones.
Anyone care to figure out how the hell this command can be used to actually if people are INSIDE the zones instead of outside of them? Checking for characters by LOCATE is VERY shoddy and unreliable in larger zones...
So yeah, only thing that ever worked script-wise was this, if it helps:
[mis]IF ( ( As2_Pursuit = 0 ) AND ( As2_Progress = 1 ) )
IF(NOT(IS_CHAR_IN_ZONE (Player1 , Slums)))
As2_PursuitCar1 = CREATE_CAR (148.5, 239.5, 2.0) 21 90 STRATOS END
As2_PursuitGuy1 = CREATE_CHAR_INSIDE_CAR (As2_PursuitCar1) 22 FBI END//FBI likes to agressively pull its victim out of car and shoot
As2_PursuitCar2 = CREATE_CAR (156.5, 125.5, 2.0) 17 0 STRIPETB END
As2_PursuitGuy2 = CREATE_CHAR_INSIDE_CAR (As2_PursuitCar2) 22 FBI END//its victim while stunned. Ideal for a bulletproof car.
SET_FAVOURITE_MODEL(As2_PursuitGuy1, STRATOS)
SET_FAVOURITE_MODEL(As2_PursuitGuy2, STRIPETB)
GIVE_WEAPON(As2_PursuitGuy1, SHOTGUN)
GIVE_WEAPON(As2_PursuitGuy2, MACHINE_GUN)
SET_CHAR_THREAT_SEARCH (As2_PursuitGuy1, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (As2_PursuitGuy1, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH (As2_PursuitGuy2, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (As2_PursuitGuy2, REACT_AS_NORMAL)
SET_CHAR_DRIVE_AGGRESSION (As2_PursuitGuy1, ON)
SET_CHAR_DRIVE_AGGRESSION (As2_PursuitGuy2, ON)
SET_CHAR_OBJECTIVE (As2_PursuitGuy1, KILL_CHAR_ANY_MEANS, Player1)
DO_NOWT
SET_CHAR_OBJECTIVE (As2_PursuitGuy2, KILL_CHAR_ANY_MEANS, Player1)
SET As2_Pursuit = 1
DISPLAY_BRIEF_NOW (1020)//l!You've got two blokes on your tail trying to kill you, watch out!
ENDIF
ENDIF[/mis]
Its a redicuously weird or specific command, it gone and did the following stuff:
Only desired to function in a NOT statement after a non-NOT statement;
^ Failed to work once either of them where alone without eachother...
Was still uncooperative after putting in a intentional never-reached IF statement with this AND having both IF() and IF(NOT()) statements.
From what i gather that was all script specific. Below here's the zone-specific stuff:
It seems to HATE being in another zone and utterly refused to work as a local navigation zone instead of a regular navigation zone.
The only time it actually worked on me was calling IF(NOT(IS_CHAR_IN_ZONE(Player1, Slums))) while the actual zone Slums was navigagion, not sharing any space with other zones and bordering to some other zones.
Anyone care to figure out how the hell this command can be used to actually if people are INSIDE the zones instead of outside of them? Checking for characters by LOCATE is VERY shoddy and unreliable in larger zones...
So yeah, only thing that ever worked script-wise was this, if it helps:
[mis]IF ( ( As2_Pursuit = 0 ) AND ( As2_Progress = 1 ) )
IF(NOT(IS_CHAR_IN_ZONE (Player1 , Slums)))
As2_PursuitCar1 = CREATE_CAR (148.5, 239.5, 2.0) 21 90 STRATOS END
As2_PursuitGuy1 = CREATE_CHAR_INSIDE_CAR (As2_PursuitCar1) 22 FBI END//FBI likes to agressively pull its victim out of car and shoot
As2_PursuitCar2 = CREATE_CAR (156.5, 125.5, 2.0) 17 0 STRIPETB END
As2_PursuitGuy2 = CREATE_CHAR_INSIDE_CAR (As2_PursuitCar2) 22 FBI END//its victim while stunned. Ideal for a bulletproof car.
SET_FAVOURITE_MODEL(As2_PursuitGuy1, STRATOS)
SET_FAVOURITE_MODEL(As2_PursuitGuy2, STRIPETB)
GIVE_WEAPON(As2_PursuitGuy1, SHOTGUN)
GIVE_WEAPON(As2_PursuitGuy2, MACHINE_GUN)
SET_CHAR_THREAT_SEARCH (As2_PursuitGuy1, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (As2_PursuitGuy1, REACT_AS_NORMAL)
SET_CHAR_THREAT_SEARCH (As2_PursuitGuy2, AREA_PLAYER_ONLY)
SET_CHAR_THREAT_REACTION (As2_PursuitGuy2, REACT_AS_NORMAL)
SET_CHAR_DRIVE_AGGRESSION (As2_PursuitGuy1, ON)
SET_CHAR_DRIVE_AGGRESSION (As2_PursuitGuy2, ON)
SET_CHAR_OBJECTIVE (As2_PursuitGuy1, KILL_CHAR_ANY_MEANS, Player1)
DO_NOWT
SET_CHAR_OBJECTIVE (As2_PursuitGuy2, KILL_CHAR_ANY_MEANS, Player1)
SET As2_Pursuit = 1
DISPLAY_BRIEF_NOW (1020)//l!You've got two blokes on your tail trying to kill you, watch out!
ENDIF
ENDIF[/mis]