I'm looking at the CreateTrapAtLocation function.
Checking the Lexicon, I have a general understanding of this function, except for a couple of questions.
If I specify a size of 2.0 in CreateTrapAtLocation, does that mean each side of the square is 2.0, with the square is centered at the specified location?
Or, is the trap actually 4.0 meters per side (2.0 from the center of the trap in all directions)?
If a faction is specified for a trap, does that mean any members of that faction can cross the trap as if it's not there?
Can custom factions be set on traps?
Finally, in the AISS code, there's this snippet:
oAISSTrap = CreateTrapAtLocation(iTrapCostant, lSpawn, GetLocalFloat(oTrapWP,"fAISS_trap_covered_area")>1.0?GetLocalFloat(oTrapWP,"fAISS_trap_covered_area"):1.0, //physical_size "ais_fp_trap"+IntToString(nCounter), //tag STANDARD_FACTION_HOSTILE, //faction GetLocalString(oTrapWP, "sAISS_trap_disarm"), GetLocalString(oTrapWP, "sAISS_trap_triggered"));
I don't understand the usage of the 1.0? and the :1.0. Can anyone explain what is going on in:
GetLocalFloat(oTrapWP,"fAISS_trap_covered_area")>1.0?GetLocalFloat(oTrapWP,"fAISS_trap_covered_area"):1.0,
Thanks!





Retour en haut






