They Are Billions

They Are Billions

Custom Levels for They Are Billions
Add custom levels to They Are Billions by subscribing to these workshop items!
Learn More
Icthulu 5 Nov 22, 2018 @ 6:32pm
Game Won trigger help
I am trying to set a game won condition when the player captures a message box. I have tried tying it to a game won option in a repeating event based on a conditional flag, but it is not working.

Can someone help direct me to how I can get this to work in any way? For this map, I didn't want to have the player clear the map, but simply escape the area.
< >
Showing 1-9 of 9 comments
CanuckBear 2 Nov 22, 2018 @ 8:46pm 
Maybe put a unit generator generate a single unit at the beginning of the game, set the flag "game won" when the "wave is killed", surround the generator with steel fence, so it cannot escape. The player can shoot the unit when reaching the area. The problem is it might play the final wave theme.
Last edited by CanuckBear; Nov 22, 2018 @ 8:51pm
Icthulu 5 Nov 22, 2018 @ 11:17pm 
Thanks, I was hoping to use that as a last resort. The goal was an honest win scenario, when that wasn't functioning, I tried spawnign a zombie in water to insta kill them. Which didn't work either.

Hopefully this is me not filling in the code fields properly or a bug, but if not, i think that your recommendation is a guaranteed method. Thank you.
Icthulu 5 Nov 23, 2018 @ 8:14pm 
Sadly, I tried using the last swarm spawn tactic, and that doesn't work. The swarm dies and the game continues on unabated. Not sure why I can't end the game successfully.
CanuckBear 2 Nov 23, 2018 @ 8:51pm 
I assume you had the flag "Game won if swarm destroyed" to Yes. I noticed sometimes these events are ignored if the event is setup to take place very early in the game (day00). Can you trigger the event on day02?
Edit: I'm testing it and that flag does nothing, the game carries on.
Last edited by CanuckBear; Nov 23, 2018 @ 9:04pm
CanuckBear 2 Nov 23, 2018 @ 9:59pm 
Ok, I did more testing, still no success.

I have tried the Script of an event. There is a function "IsDead(id)". I created a Zombie (entity), surrounded it with steel walls, gave it the id "EndGameZombie". In the script, I added the action "Execute Code". For the Condition, I typed IsDead(EndGameZombie). For the Execute property I typed EndGameWon(). Nothing happens in the game. I kill the zombie, game carries on.

Maybe you can play more with the scripts.
Numantian Games  [developer] 1 Nov 23, 2018 @ 11:48pm 

That should work fine. You can just set in the event the Game Won check and no need to set more actions with code.

Make sure that in the start time for the event is zero, otherwise the event won't evaluate the condition until their start time has been reached.

We have modified the editor so that the event start time is by default (0) instead of (1 day) as it can lead to confusion when dealing with script conditions.
Icthulu 5 Nov 24, 2018 @ 9:31am 
Sadly I'm not having any luck with getting this functioning. Maybe you can help me understand what I have miscoded.

I have a variable in variables and functions called wincon with initial value of 0

I have a UnitMapEventMessage 5x5 that has text and in the advanced options Execute box 'wincon=1;' (no quotes)

I have an event ID game won with condition wincon=1
repeat period 1h (tried leaving this blank and has same effect of not firing)
max repetitions 0 (left this alone, have tried 999, but that fails as well)
Game Won? checked Yes

Will add link to the game on workshop in a moment.
Last edited by Icthulu; Nov 24, 2018 @ 9:32am
Numantian Games  [developer] 1 Nov 24, 2018 @ 10:39am 
You are right, it was a really weird bug with the operator comparison equal.
It is fixed and tested it in your level. Just restart Steam to force the game update.
Thanks for the feedback.

About triggering events you don't need to set repetitions. The event is continuously evaluating the StartTime and the condition (if any), until both are true and then it triggers. And If it has repetitions the event will trigger when the time is reached and the condition is true again.

By the way, don't put buildings outside the buildable area of the map as it can cause weird problems.
Icthulu 5 Nov 24, 2018 @ 2:38pm 
You are fantastic! Thank you!!!!!! I wish that every game I purchased had developers like you and that this game is a financial success. For me, it really checked every box.
< >
Showing 1-9 of 9 comments
Per page: 15 30 50