Scripts / Quest to open door

Author
Message
Enzo1400
5
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 7th Jun 2022 22:33
Hello,

I've tried to use the scripts in this thread https://forum.game-guru.com/thread/207801?page=10#msg2532248 but the killcount changes only after the first kill, after it doesn't change, so the door can't be opened. Please, may anyone test this?

Is it possible to apply the script to an entity that it's not an enemy, so that destroying it a door can be opened?

In the map The Big Escape of GameGuru Classic is used the script missiondoor.lua (scriptbank > stories), I've tried to use it in a simple map, but it gives an error message. Is there any other script to use together? May anyone explain how to use missiondoor.lua?

Thank you very much in advance
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 8th Jun 2022 09:25
missiondoor.lua requires KillCount variable to change when you kill enemies, at 5 kills it will let you use the door
so you can add KillCount = KillCount + 1 in the exit() function of your AI script to count the kills
(should also add a KillCount = 0 as a global at the top of the door script)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Enzo1400
5
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 8th Jun 2022 17:22
Thank you for your reply. In missiondoor.lua there isn't an exit function. I can write it, but I don't know which script to add to the door. About your script, I've tried to add KillCount = KillCount + 1 (ai script) and or only to add KillCount = 0 to door script, but the killcount display a change only after the first kill (I've tried with two and three Hippie Zombies), so the door can't be opened. Please, may you attach the two script that about you are ok? Or to explain how to use properly missiondoor.lua? Thanks
PM
Enzo1400
5
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 8th Jun 2022 17:47
I've seen that missiondoor.lua requires timecharge.lua to apply to the entities, so I need only your scripts, thanks
PM
Enzo1400
5
Years of Service
User Offline
Joined: 26th Jul 2018
Location:
Posted: 9th Jun 2022 19:18
It works! I've removed the last exit function:

ai_fastzombie_exit(e) --exit(e) call from the AI script used
--above exit function must exist in the AI or just don't include it here
PM

Login to post a reply

Server time is: 2024-04-27 01:07:24
Your offset time is: 2024-04-27 01:07:24