// defines all the unit variables that may be used in the scripts... // usually, you do not want to touch the already existing variables (cos that may break // the existing scripts) - probably just want to add new ones. // max 48 variables allowed (0 to 47), the max is defined in the game code. // note: current implementation is slower when using unit variable names instead of // using the id numbers. However, using names is recommended. 0=engaged 1=fear 2=cdist 3=sneaky 4=grouping 5=leads 6=proning 7=covering 8=retreat 9=docover 10=docovershoot 11=ammolow_said 12=resumespawn 13=pursue 14=nobuildings 15=alertpathdone 16=alertpathrunning 17=dooropen //18=doordestroyable 19=doorautoclose 20=doormovestate 21=doormovecounter 22=triggered 23=triggercount 24=triggerdelay 25=triggerretire 26=charexecuted 27=charspeechcounter 28=savedestroy 29=savenomain 30=scriptrange 31=scriptclip 32=wander 33=avoidlight 34=cargounitid 35=usablevehicle 36=flankingfailed 37=didnothing 38=executed 39=triggeronscreen 40=following 41=post_id 42=follow_route 43=wait_for_player 44=npc_door 45=wall_group 46=run_from_aliens 47=counter // WTF is this? //38=soundfalloff // NOTICE: most variables still have no effect!!! // THESE ARE JUST PRELIMINARY DESIGNS!!! // // explanations for some variables: // // engaged = used internally by the scripts to determine whether // the unit is currently engaged in combat or not. // if engaged, usually attempts to close on enemy. // if not engaged, usually will continue on its guard path. // proper values are 0 or 1. // // fear = fear factor. tells the cowardness of the unit. // proper values are 0 - 100. // // cdist = combat distance. tells how far away will this unit will // stay from the player (the preferred shooting range). // proper values depend pretty much on the weapon's max range. // // sneaky = sneakiness. tells how sneaky this unit is. // a sneaky unit is more likely to try to get behind the enemy. // proper values are 0 - 100. // // grouping = grouping factor. tells how much the unit attempts to get near // other friendly units. // proper values are 0 - 100. // // leads = leadership factor. tells how much other units do what this // unit does. the more leadership, the more likely other friendly // units will follow this ones example when for example rushing. // proper values are 0 - 100. // // proning = proning factor. tells how often the unit hits the dirt. // only soldiers may go prone, vehicles usually cannot. // proper values are 0 - 100. // // covering = covering factor. tells how othen the unit heads for cover // instead of rushing. // proper values are 0 - 100. // // retreat = tells whether the unit is in retreat mode or not. // while in retreat mode, the unit attempts to get away from // the enemy. preferably to other friendly units. // proper values are 0 or 1. // // cover = tells that the unit is currently going for cover or in cover. // proper values are 0 or 1. // // covershoot = tells that the unit is currently peeking out of cover to // shoot at the enemy. // proper values are 0 or 1. // // resumespawn = tells that the unit will resume to it's spawn position // once dis-engageing from battle (lost or killed the enemy). // proper values are 0 or 1. // // pursue = tells that the unit will pursue target enemy (goes to last // position where it saw the enemy). // proper values are 0 or 1. // // nobuildings = tells that the unit will not go inside buildings // (generally set for vehicles). // proper values are 0 or 1. // // alertpathdone = tells that unit has completed the alert path // // alertpathrunning = tells that unit is doing the alert path // // dooropen = tells that the unit is open (for doors only) // // triggered = unit (alien spawn) triggered // // triggercount = how many times the unit should trigger // // triggerdelay = the delay between multiple triggers // // charexecuted = this character has already been executed // (used by special talkable characters that give something) // // charspeechcounter = the speech readiness counter // (used by special talkable characters that give something) // // savedestroy = tells that the unit should be destroyed at save/load // (once a unit has been destroyed set this flag to ensure the unit // will be destroyed after save/load) // proper values are 0 or 1. // // savenomain = tells that the unit's main script should be inactivated at save/load // (once a one-time event has completed, this flag should be set to ensure // the event won't happen again after save/load) // proper values are 0 or 1. // // scriptrange = range of the script in meters. // // scriptclip = axel clipping of the script (bit mask). // // wander = unit likes to wander around if not engaged // // avoidlight = unit attempts to avoid light in rush paths (does deformPathForDarkness) // // cargounitid = unit id of the unit being transported by a vehicle // (the original player controlled unit) // // usablevehicle = this vehicle is usable (can take in cargo, if empty) // // didnothing = common ai did not do anything flag (while engaged). // engaged_wait should clear this flag and do whatever is necessary in this case. // // triggeronscreen = this trigger will trigger (spawn alien) even if on screen. // (otherwise aliens won't be spawned if spawnpoint is on screen - or // more precisely, too close to player) //
maciasldz