Hey I've been trying to get this function on for my map and I can't seem to make it work. I have a region set in ZE called "jedibarrier" and I want it to deactivate some barriers I've put up, once the player walks into the region. For some reason it won't detect when you enter the region. I did everything all the tutorials on here said, and I've been using search for a few days now but nothing on here has worked. Here's my code:
Hidden/Spoiler:
OnEnterRegion(
function(region,character)
if IsCharacterHuman(character) then
DeactivateRegion("jedibarrier")
I've tried using "player" instead of "character" but the same thing happens, I've tried using DeactivateRegion("jedibarrier")/ActivateRegion("jedibarrier") at different spots and I've tried using ReleaseEnterRegion(jedibarrier). I'm sure that the region is in the right layer, and I'm sure that I am entering the region as team 1 (ATT). But I am not sure why its not working.
Re: OnEnterRegion Troubles
Posted: Wed Dec 28, 2011 5:01 pm
by [RDH]Zerted
Make the following changes and post the resulting debug log. Do a full clean too, just to be sure. The code is in ScriptPostLoad() correct?
print('Before OnEnterRegion')
OnEnterRegion(
function(region,character)
print('In OnEnterRegion')
if IsCharacterHuman(character) then
DeactivateRegion("jedibarrier")
DisableBarriers("Barrier728")
DisableBarriers("Barrier729")
DisableBarriers("Barrier730")
DisableBarriers("Barrier731")
ShowMessageText("level.bou.jediattack", ATT)
end
print('Leaving OnEnterRegion')
end,
"jedibarrier"
)
print('After OnEnterRegion')
ActivateRegion("jedibarrier")
print('After region activation')
Re: OnEnterRegion Troubles
Posted: Wed Dec 28, 2011 5:21 pm
by fasty
Hidden/Spoiler:
Opened logfile BFront2.log 2011-12-28 1316
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: No custom_gc_10.lvl
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_GetGCButtonList()
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = check_mode1
cur_button = nil
this.CurButton = nil
cur_button = nil
Checkbox for check_era7 clicked
this.CurButton = check_era7
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 055D116C
The key, value is: blue 193
The key is mapluafile, the formated value is: BOU<A>_<B>
The key, value is: bSelected 1
The key, value is: green 35
The key, value is: era_g 1
The key, value is: mode_con_g 1
The key, value is: isModLevel 1
The key, value is: red 13
custom_printTable(): Returning
custom_printTable(): table: 055D672C
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras.key = era_g Era = era_g subst = g
Adding map: BOUg_con idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: No user_script_10.lvl
ifs_sideselect_fnBuildScreen()
game_interface: Exited
Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ClothData" set item count after being allocated
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(2076)
Weapon "cis_weap_hero_jangopistol" missing high res geometry "cis_1st_weap_inf_pistol"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(625)
Team missing class "jdi_demojedi" (check the side's .req file)
uf_updateClassIndex(): Added class: dro_droid_Septoid
uf_updateClassIndex(): Added class: des_hero_aalya
uf_updateClassIndex(): Added class: all_droid_r2d2
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameModel.cpp(221)
Model "tat_inf_dewback" already loaded in ather level file
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: ccdbd33a
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: cddbd4cd
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: cadbd014
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: cbdbd1a7
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c8dbccee
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c9dbce81
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c6dbc9c8
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c7dbcb5b
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c4dbc6a2
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: c5dbc835
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0e104a47
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0d1048b4
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 10104d6d
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0f104bda
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0a1043fb
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 09104268
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0c104721
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 0b10458e
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 06103daf
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 05103c1c
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CollisionBody.cpp(250)
Duplicate collisionbodyprimitive exists in another level file: 7c08a8ac
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0977d4d9: trying to replace "tat2_bldg_medium1" with "tat2_bldg_medium10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityWalker.cpp(3651)
Could not build EntityWalker
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=cffa5490: trying to replace "tat2_bldg_wall01" with "tat2_bldg_wall010"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=6f7eb1dd: trying to replace "tat2_bldg_wall_4m" with "tat2_bldg_wall_4m0"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0a36a4c9: trying to replace "tat2_bldg_dome1" with "tat2_bldg_dome10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=d0fa5623: trying to replace "tat2_bldg_wall01" with "tat2_bldg_wall011"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=4c27f1cc: trying to replace "tat2_bldg_small2" with "tat2_bldg_small20"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0777d1b3: trying to replace "tat2_bldg_medium1" with "tat2_bldg_medium12"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0677d020: trying to replace "tat2_bldg_medium1" with "tat2_bldg_medium13"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=de2f9367: trying to replace "tat2_bldg_small1" with "tat2_bldg_small10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0bf28273: trying to replace "tat2_bldg_large1" with "tat2_bldg_large10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=dd2f91d4: trying to replace "tat2_bldg_small1" with "tat2_bldg_small11"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=e02f968d: trying to replace "tat2_bldg_small1" with "tat2_bldg_small12"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=9c8cb29f: trying to replace "tat2_bldg_tent1" with "tat2_bldg_tent10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=163b34db: trying to replace "tat2_bldg_dome3" with "tat2_bldg_dome30"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=df2f94fa: trying to replace "tat2_bldg_small1" with "tat2_bldg_small13"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=4e27f4f2: trying to replace "tat2_bldg_small2" with "tat2_bldg_small22"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=6ce7b7d5: trying to replace "tat2_bldg_tower1" with "tat2_bldg_tower10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=4f27f685: trying to replace "tat2_bldg_small2" with "tat2_bldg_small23"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0d77db25: trying to replace "tat2_bldg_medium1" with "tat2_bldg_medium14"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=1038ecd2: trying to replace "tat2_bldg_dome2" with "tat2_bldg_dome20"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=89238ffa: trying to replace "tat2_bldg_arch1" with "tat2_bldg_arch10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=8a23918d: trying to replace "tat2_bldg_arch1" with "tat2_bldg_arch11"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=da2f8d1b: trying to replace "tat2_bldg_small1" with "tat2_bldg_small14"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=1138ee65: trying to replace "tat2_bldg_dome2" with "tat2_bldg_dome21"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=9b8cb10c: trying to replace "tat2_bldg_tent1" with "tat2_bldg_tent11"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=87238cd4: trying to replace "tat2_bldg_arch1" with "tat2_bldg_arch12"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=0cf759f8: trying to replace "tat2_bldg_gate" with "tat2_bldg_gate0"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=d92f8b88: trying to replace "tat2_bldg_small1" with "tat2_bldg_small15"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=9e8cb5c5: trying to replace "tat2_bldg_tent1" with "tat2_bldg_tent12"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=88238e67: trying to replace "tat2_bldg_arch1" with "tat2_bldg_arch13"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=dc2f9041: trying to replace "tat2_bldg_small1" with "tat2_bldg_small16"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=db2f8eae: trying to replace "tat2_bldg_small1" with "tat2_bldg_small17"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=d62f86cf: trying to replace "tat2_bldg_small1" with "tat2_bldg_small18"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=9d8cb432: trying to replace "tat2_bldg_tent1" with "tat2_bldg_tent13"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=edcf7762: trying to replace "tat2_bldg_shop1" with "tat2_bldg_shop10"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=4e0d396c: trying to replace "com_item_weaponrecharge" with "com_item_weaponrecharge0"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=d9fee2d6: trying to replace "com_item_healthrecharge" with "com_item_healthrecharge0"
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CommandPost.cpp(476)
Label "level.tat2.jawa_cp" not localized
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=7a392958: trying to replace "com_inv_col_8" with "com_inv_col_80"
Before OnEnterRegion
After OnEnterRegion
After region activation
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'des_weap_greedopistol' is not localized for stats page
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'dro_droid_Septoid' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'des_inf_Noweapon' is not localized for stats page
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'all_droid_r2d2' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'dro_droid_jawadroid' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'dro_droid_jawadroid' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'des_inf_rodian' with no low res geometry!
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(11386)
EntitySoldierClass::Build 'dro_droid_Septoid' with no low res geometry!
In OnEnterRegion
Leaving OnEnterRegion
In OnEnterRegion
Leaving OnEnterRegion
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'cis_weap_wrist_dart' is not localized for stats page
Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'cis_weap_Rocket' is not localized for stats page
uf_updateClassIndex(): Added class: rep_hero_cloakedanakin
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #1 to `SelectCharacterClass' (number expected, got nil)
stack traceback:
[C]: in function `SelectCharacterClass'
(none): in function <(none):63>
In OnEnterRegion
Leaving OnEnterRegion
Break();
Button("FIRE_SECONDARY", "PRESS");
Posture("STAND", "CROUCH");
Energy(">=", 2.5);
In OnEnterRegion
Leaving OnEnterRegion
Edit: I found out what the problem was after messing around with it all day. I accidentally made a second region in ZE. >.< I hate ZE so much.