Scripts / [SOLVED] Kill Enemy To Win Help?

Author
Message
WebNeoRaven
User Offline
Joined: 15th Nov 2020
Location:
Posted: 15th Nov 2020 17:29
Hello!

I am messing around with GG and am trying to figure out how to get a "game over" when I kill everything.

I looked at https://forum.game-guru.com/thread/217460#msg2572286 and copied the last code and put it into the scriptbank folder...I then put the script on an always active and static=no barrel right by a default soldier using the ai_soilder system....The script does show as a LUA File under file type. Even with all of this, I can't get it to trigger either in demo or in standalone. Any suggestions?

The author of this post has marked a post as an answer.

Go to answer
PM
AmenMoses
GameGuru Master
4
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Nov 2020 22:08
Post the script and I'll take a look at it.
Been there, done that, got all the T-Shirts!
PM
WebNeoRaven
User Offline
Joined: 15th Nov 2020
Location:
Posted: 16th Nov 2020 00:58
Here's what they had....Apparently, it worked fine, but I just can't get it to do anything.

PM
smallg
Community Leader
15
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Nov 2020 12:07
do you see how many enemies are left on your screen? is your file called win2.lua?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
WebNeoRaven
User Offline
Joined: 15th Nov 2020
Location:
Posted: 16th Nov 2020 17:12
Ooo, okay, now we're getting somewhere. With the standalone and demo running, it's now saying "all enemies defeated, level is complete" right when I start it even with the soldier up. Any tips with that?
PM
GubbyBlips
2
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Nov 2020 18:35
The question I would ask is;
What does user want this script to do??
As it is, it does nothing. You have to add a new level call, etc.
So... what commands did you put into the part that says
>> --FinishLevel() << ?
PM
AmenMoses
GameGuru Master
4
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Nov 2020 19:33
This post has been marked by the post author as the answer.
Ahh, that uses ai_soldier_state whjich is from the old AI system.

Relpace it with ai_bot_state which is what Lee has used in the new system.
Been there, done that, got all the T-Shirts!
PM
WebNeoRaven
User Offline
Joined: 15th Nov 2020
Location:
Posted: 16th Nov 2020 23:03
Oo, it seems that did it! I may end up trying to make it automatically return to the main menu, but it's a start! Thanks, everyone!
PM

Login to post a reply

Server time is: 2021-01-28 05:04:53
Your offset time is: 2021-01-28 05:04:53