Jump to content

Adding a Continue() to a BCS block


erebusant

Recommended Posts

I have some bcs blocks I need to add a Continue() to, however the IF statement isn't always the same depending on whether you have TBTweaks Improved Difficulty System installed or not. I'm trying to use the following code which parses and installs seemingly ok (at least it doesn't choke), but I never get the Continue() added to the block.

COPY_EXISTING	~BH2101.BCS~	~override~
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~		CreateCreature("BHOGUARD",\[1320\.665\],5) // Orc Guard
	CreateCreature("BHOGUARD",\[1320\.665\],5) // Orc Guard
	CreateCreature("BHOGUARD",\[1320\.665\],5) // Orc Guard~ ~		CreateCreature("BHOGUARD",[1320.665],5) // Orc Guard
	CreateCreature("BHOGUARD",[1320.665],5) // Orc Guard
	CreateCreature("BHOGUARD",[1320.665],5) // Orc Guard
	Continue()~
 COMPILE_BAF_TO_BCS

Any suggestions?

Link to comment

WeiDU doesn't decompile comments like that, so I wouldn't expect it to match anything.

 

Try just running DECOMPILE_BCS_TO_BAF and then copying the result so you have the exact block (will be something like CreateCreature(blah) // ~Orc Guard~). You'll need to use a different delimiter since the pattern will use tildes.

 

Eventually, you'd probably want a less exact pattern.

Link to comment

Also, I think you'll need a whitespace-matching variable so you can pick up the newlines.

 

But maybe the better question is, do you really want a Continue() there? Wouldn't a variable setting be better, so that the block does nothing if the orcs are already created? And if that's already there, I wouldn't worry about the Continue().

Link to comment
Also, I think you'll need a whitespace-matching variable so you can pick up the newlines.

 

But maybe the better question is, do you really want a Continue() there? Wouldn't a variable setting be better, so that the block does nothing if the orcs are already created? And if that's already there, I wouldn't worry about the Continue().

The problem is there is already an OnCreation() at the beginning of the IF section in the original bcs file.
Link to comment
Also, I think you'll need a whitespace-matching variable so you can pick up the newlines.

 

But maybe the better question is, do you really want a Continue() there? Wouldn't a variable setting be better, so that the block does nothing if the orcs are already created? And if that's already there, I wouldn't worry about the Continue().

Well I took the easy way out. There was already a BP_More_Stooges Global 0 being set to Global 1 so I just got rid of the OnCreation(). That worked.

Link to comment

Just as a suggestion, particularly when you're dealing with brackets in your text as you are, I really recommend using REPLACE_TEXTUALLY EXACT_MATCH . Works much better in my experience. You don't need to do the escape slash on the brackets and I've always seemed to have a much better chance of "hitting" the text I'm looking to replace with it. YMMV.

 

Qwinn

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...