Scripts / Is there a way to make a door open after killing a certain amount of enemys?

Author
Message
daverave29
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 9th Oct 2015 19:03
Like the title says really, I have tried playing with the missiondoor script but doesn't seem to like me very much.
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 9th Oct 2015 20:12 Edited at: 9th Oct 2015 20:13
(1) Add a global variable that holds the number of enemies that you need to kill (objective). globals need to go above the function....init section.
(2) decrease the value from (1) every time an entity is destroyed.
(3) add a condition (in main function section ) to check if (1) is 0....if it is then activate the entity if used i.e. the door entity name.

hope this helps...
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
Interests: Drumming, Saxophone, Art, Theatre, Music.
Bobby-Z
User Banned
Posted: 11th Oct 2015 17:37
i would think the variable would be added in zombie script then a seperate script for door would need to be made to watch for variable to reach certain amount then to open door upon reaching that amount , thats basically how i got player to be able to recieve points/money for killing zombies if you want ill be happy to create door script for you and tell you what variable to include in your zombie script and where however zombie script is TGC's so i cant adjust it and send it to you that would be wrong , so you would have to do that part your self , let me know if you havent already gotten this done , if not ill do it today and attach it in post later today

Login to post a reply

Server time is: 2024-05-05 03:53:54
Your offset time is: 2024-05-05 03:53:54