Scripts / Win Conditions?

Author
Message
MistaGameDev
8
Years of Service
User Offline
Joined: 21st Jul 2015
Location:
Posted: 8th Jul 2017 23:04
Is it possible to make it so you cannot win unless you kill a certain amount of enemies?
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 9th Jul 2017 05:40
Used to have the objective field in the properties panel for this.
Now it will need to be scripted somehow.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

MistaGameDev
8
Years of Service
User Offline
Joined: 21st Jul 2015
Location:
Posted: 9th Jul 2017 17:06
That's stupid! Why did they change it?
PM
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 10th Jul 2017 03:05
its quite easy i went ahead and made some code for you and tested it so inside of the ai_soldier.lua paste this at the bottom it will track the number of kills


if i did that correctly ... anyway then create a new lua file .

I had saved the lua file showkills.lua if you want a different name dont forget to change the showkills_init and main to whatever you name the file but this code will display the number of kills and if the number of kills = the requiredkills # then it jumps to the next level. attach this script to like a barrel make it always active so it will always run and goto the properties of the barrel and change the ifused field to whatever level you want it to change too. sometimes i have problems with it changing level still so one thing i found is if you change the UseKey to the name of the object (i usually rename it) it will then work. but keep the if used field the name of the next level without the .fpm. Hope this has helped.


oh if you are using zombies paste the first part in the ai_fastzombie.lua at the end or ai_zombiewalk.lua should have same results. oh but change where it says ai_soldier to match the script you are editing and again best practice is to make a copy of it renamed then edit.
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 10th Jul 2017 03:25
[video=youtube]https://www.youtube.com/watch?v=HLPxntVtZoM[/video] a video of how to input the code both in lua and in the game editor.

Login to post a reply

Server time is: 2024-04-18 04:20:32
Your offset time is: 2024-04-18 04:20:32