BrainBread 2

BrainBread 2

30 ratings
HowTo - Objectives
By Wuffesan and 1 collaborators
This guide will explain the basics of how to make missions/objectives for BrainBread 2.
   
Award
Favorite
Favorited
Unfavorite
Missions [logic_objective]
logic_objective is used to create 'missions' or 'objectives' for BrainBread 2. They are similar to the ones in BrainBread, but with a few more additions!

But lets get into what they can do, shall we?

Name
Description
Index
Set a unique identifier for this objective, if you have multiple objectives they must have different indexes!
Time
Set the time in seconds until this objective ends. 0 = infinite...
Team
Which team should see this objective?
Experience
The amount of experience you get/gain after you complete the objective
Should Fail?
This is only used for the timer (If Maximum time allowed is MORE than 0)
Kills needed
How many kills do you need of the target entity? If using entity counting.
Objective
What is the objective? What do you want the players to do? Add %s1 in the objective string to toggle entity counting logic.
Icon Location
If this and icon texture is specified it will spawn an objective icon at the location with the desired texture, textures are searched under vgui/hud/objectiveicons/. The location should be linked to an info_target entity.
Icon Textures
If this and icon location is specified it will spawn an objective icon at the location with the desired texture, textures are searched under vgui/hud/objectiveicons/.
Scaling Type
Should this objective entity scale the kills needed and time left by the amount of people in the game? Fixed scaling will exclude the time from being scaled.
Kill Scale Factor
How much % should the kills needed scale by for every player?
Maximum Kills Needed
When a player connects or disconnects the objective will be rescaled if scaling is enabled, if the kills needed is higher than this number it will be clamped to this number.
Minimum Kills Needed
When a player connects or disconnects the objective will be rescaled if scaling is enabled, if the kills needed drops below this number it will be clamped to this number.
Time Scale Factor
How much % should the time left scale by for every player?
Maximum Time
When a player connects or disconnects the objective will be rescaled if scaling is enabled, if the time left is higher than this number it will be clamped to this number. (seconds)
Minimum Time
When a player connects or disconnects the objective will be rescaled if scaling is enabled, if the time left drops below this number it will be clamped to this number. (seconds)

The table above me, explains the important things you need to know of the logic_objective. You can use the logic_objective as a timer, kill # amount of zombies etc. And if you want to make sure the first objective starts when the map begins, use the flag "Start Enabled". Or you can use the game_manager and call "Start" on the entity's input.

logic_objective also have very simple outputs which is easy to understand. Look on the table below, for a full list of logic_objective's outputs to see what it does.
Output
Description
OnEnd
When the objective is done.
OnStart
This will always play whenever this entity is starting.
OnFail
When the timer fails.
OnTimeOver
If you've set any time then this output will be sent when the time is over
The HotZone [trigger_capturepoint]
This is the Capture Point or The HotZone. This trigger is very basic, and its functions is very simple. I doubt you guys need any more information than that!

Lets show the table, shall we?
Name
Description
Team
Which team should be able to capture this point?
Can enemies halt the progress?
When enemies enter this trigger will they halt the capture progress?
Capture Time
How many seconds will it take to capture this point?
Percent Required
How much percentage of the team size is required to be in the volume in order to start capturing this point?

trigger_capturepoint Outputs
Output
Description
OnCaptured
This point has been captured!
The Creation
logic_objective
Everytime you create your logic_objective, make sure you change the INDEX, they can't use the same INDEX as the first one, else they will break.

On our first example objective, lets name it, set a timer and how many we need to kill before the time runs out. And don't forget to set Should Fail to Yes.


And now for the objective string:
Kill %s1 amount of zombies before the timer runs out!

Very simple isn't it? And for the %s1, it basically means that the code will override that string with numbers that will count how many zombies you have left to exterminate. But lets get into the outputs, so we can set what happens if the timer fails before you kill all needed zombies, or when you actually kill them.

On this example, i set the OnFail to spawn Fred, and OnEnd to enable the escape trigger.

And if you want to have a icon showing where to go, you can use the Icon/Objective Texture and Icon/Objective Location. Icon/Objective Location only need the name of a info_target and it will set the texture on that location. And for the texture itself, you can find the textures under vgui/hud/objectiveicons/. And of course, you can also make your own textures. And if you use Icon/Objective Texture, make sure you write the full name without the extension.



Of course, you can do a lot more with these entities, but that is something you need to mess around with yourself. I hope this guide helped you somewhat! :)
15 Comments
Nyx 21 Aug, 2016 @ 7:12am 
i have a problem about npc, in my map, create the zombie_volume to spawn npc_walker, but they just stand there when spawn....only move when i closing them, im already create the entity that called info_node, but it still dont work, same problem in npc_bandit, what should i do? sorry my bad english......
Wuffesan  [author] 7 Aug, 2016 @ 12:40pm 
It will be a step by step one, and will explain how it works first. It will be pretty long.
WhiteLightningTwister 7 Aug, 2016 @ 10:34am 
id like a step by step guide of each, if thats possible. i seem to be confusing myself
Wuffesan  [author] 7 Aug, 2016 @ 8:00am 
I can make a guide on how to make a custom inventory item (Its not really tied in with the objective entity) and which entity/function brush to use it with.
WhiteLightningTwister 7 Aug, 2016 @ 7:57am 
This isn't paticlary helpful. any chance you could make a better detailed thing for logic objective, im having trouble making a custom inventory item. like a tool box, i am very perlexed on how the item works
bigmanjones 1 Aug, 2016 @ 5:51am 
Thanks dude! That one little number just went over my head. Thanks a lot! :steamhappy:
Wuffesan  [author] 1 Aug, 2016 @ 5:39am 
make sure its EndRound with value of 0

0 - human wins
1 - zombie wins

and with the manager, make sure the rounds are more than 1
bigmanjones 1 Aug, 2016 @ 4:50am 
I have a question. I tried to make an areana map, but, after round 1, nothing happens! Its supposed to end the round (OnEnd ---> EndRound (to the manager)). Any help? (When I copy the entities from the colosseum map, it's works. I Compared it to mine, and I found nothing. Any help?
Wuffesan  [author] 28 Jul, 2016 @ 9:55am 
Yeah, that is pretty much it.
The_Guardian™ 28 Jul, 2016 @ 9:49am 
So, I just create map, etc etc, I put item_weapon_randomize, spawns, and that's all? I created a DM map? (Just asking to be sure)