megsb927
Junior Member
Posts: 30
Threads: 10
Joined: Feb 2013
Reputation:
0
|
level doors
ok so I start the game in my first map, the door to the second map says locked when you try to open it, then I get the key and use it on the door. I can hear the unlock sound and the key dissapears but when i click on the door it still says locked. In the entity tab the door is checked as locked and the map it goes to is my second map and player start area 1 for the next map but it won't let me go to it.
|
|
02-15-2013, 10:02 PM |
|
i3670
Posting Freak
Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation:
36
|
RE: level doors
We won't know what the problem is if you don't post your script. Anyway.
You should use
SetLevelDoorLocked(string& asName, bool abLocked);
NOT
SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);
|
|
02-15-2013, 10:04 PM |
|
megsb927
Junior Member
Posts: 30
Threads: 10
Joined: Feb 2013
Reputation:
0
|
RE: level doors
(02-15-2013, 10:04 PM)i3670 Wrote: We won't know what the problem is if you don't post your script. Anyway.
You should use
SetLevelDoorLocked(string& asName, bool abLocked);
NOT
SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);
void OnStart()
{
AddUseItemCallback("", "Key_1", "level_wood_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_wood_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Key_1");
}
void OnEnter()
{
}
void OnLeave()
{
}
that is my map script I tried changing it to SetLevelDoorLocked and it said fatal error
|
|
02-15-2013, 10:14 PM |
|
NaxEla
Senior Member
Posts: 415
Threads: 5
Joined: Dec 2012
Reputation:
28
|
RE: level doors
Change:
SetSwingDoorLocked("level_wood_1", false, true);
To:
SetLevelDoorLocked("level_wood_1", false);
|
|
02-15-2013, 10:16 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: level doors
(02-15-2013, 10:14 PM)megsb927 Wrote: (02-15-2013, 10:04 PM)i3670 Wrote: We won't know what the problem is if you don't post your script. Anyway.
You should use
SetLevelDoorLocked(string& asName, bool abLocked);
NOT
SetSwingDoorLocked(string& asName, bool abLocked, bool abEffects);
void OnStart()
{
AddUseItemCallback("", "Key_1", "level_wood_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level_wood_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Key_1");
}
void OnEnter()
{
}
void OnLeave()
{
}
that is my map script I tried changing it to SetLevelDoorLocked and it said fatal error
void OnStart()
{
AddUseItemCallback("", "Key_1", "level_wood_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false);
PlaySoundAtEntity("", "unlock_door", "level_wood_1", 0, false);
RemoveItem("Key_1");
}
void OnEnter()
{
}
void OnLeave()
{
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
02-15-2013, 10:18 PM |
|
megsb927
Junior Member
Posts: 30
Threads: 10
Joined: Feb 2013
Reputation:
0
|
RE: level doors
(02-15-2013, 10:16 PM)NaxEla Wrote: Change:
SetSwingDoorLocked("level_wood_1", false, true);
To:
SetLevelDoorLocked("level_wood_1", false);
this worked thank you!
|
|
02-15-2013, 10:52 PM |
|
|