Sinisterius
They're all in header_operations.py, why would I need to list most of the new commands here?
Looping through each agent and doing plentiful of code in each loop in a time period of ~0.1seconds for 4 times is not a good idea (one of the agent loops seems to be nested inside another agent loop which is a really bad idea). With scene props, you could optimize the scripts a lot.Bolkonsky said:How is spawning a scene prop going to help Spear brace?
Bolkonsky said:Don't worry about that, it will still work.
Did you add it to all the missions, like "lead_charge" and various other battles, in module_mission_templates.py?ZemplinTemplar said:Bolkonsky said:Don't worry about that, it will still work.
Well, it isn't working.
spearwall_trigger_1,
spearwall_trigger_2,
spearwall_trigger_3,
spearwall_trigger_4,
spearwall_trigger_5,
spearwall_trigger_6,
spearwall_trigger_7,
spearwall_trigger_8,
spearwall_trigger_9,
Umm.. no.Bolkonsky said:You can do what Sinisterius said to get rid of the error, but that won't make it work. It's purely aesthetic. It's there for an option to turn it on and off in a menu somewhere, if I had to guess.
Sinisterius said:Place this..
(assign, "$setting_use_spearwall", 1), to module_scripts.py, somewhere in game_start script (the first script). Then you shan't get that error anymore.
Bolkonsky said:Did you add it to all the missions, like "lead_charge" and various other battles, in module_mission_templates.py?
And by "it" I mean:
Code:spearwall_trigger_1, spearwall_trigger_2, spearwall_trigger_3, spearwall_trigger_4, spearwall_trigger_5, spearwall_trigger_6, spearwall_trigger_7, spearwall_trigger_8, spearwall_trigger_9,
You can do what Sinisterius said to get rid of the error, but that won't make it work. It's purely aesthetic. It's there for an option to turn it on and off in a menu somewhere, if I had to guess.
("game_start",
[
(assign, "$setting_use_spearwall", 1),
<other code>
]),
Sinisterius said:Umm.. no.Bolkonsky said:You can do what Sinisterius said to get rid of the error, but that won't make it work. It's purely aesthetic. It's there for an option to turn it on and off in a menu somewhere, if I had to guess.
These triggers only run if the global variable setting_use_variable equals to 1. If you don't assign it, then it isn't equal to anything (the game engine might automatically make it 0, but the triggers still won't run because the variable needs to be 1). Just take a short look at the conditions block..
ZemplinTemplar said:Thanks, that did get rid of the problem, but the bracing doesn't work anyway.
I'm giving up on the code. It's impossible to implement properly and I get the feeling it will be semi-useless ingame. Thanks anyway.
You do realize that the triggers need the global variable setting_use_spearwall to be set to 1? If you don't set it to anything, it will be 0.. For gods sake, you said it yourself, it's for turning on/off.. it doesn't simply remove the compiling error, it actually enables the triggers which contain the main process of Spear Bracing! *zing*Bolkonsky said:Adding (assign, "$setting_use_spearwall", 1) to module_scripts will not solve his problem of Spear Brace not working, just like I said. All it does is get rid of the warnings in the compilation, purely aesthetic. That's there so that someone can make an option to turn it on and off! Read the thread!
Sinisterius said:These triggers only run if the global variable setting_use_variable equals to 1. If you don't assign it, then it isn't equal to anything (the game engine might automatically make it 0, but the triggers still won't run because the variable needs to be 1). Just take a short look at the conditions block..
ZemplinTemplar said:Thanks, that did get rid of the problem, but the bracing doesn't work anyway.
I'm giving up on the code. It's impossible to implement properly and I get the feeling it will be semi-useless ingame. Thanks anyway.
Yeah..Bolkonsky said:I will say it again. Adding the code to the top of module_scripts will not solve his problem of it not working.
Maybe you can ask the creator? Or someone who uses the code, and got it working, that did not do that? (Me, in case you can't figure it out.) So no, it's not needed for it to function.
[/quote]dunde] Good modder should accomodate said:I got those errors too at first so all I did was this.Notice the star where I set $setting_use_spearwall to 1. That will fix the $setting use spearwall problem.spearwall_trigger_1 = (0.2, 0, ti_once, [], [
(assign,"$spear_in_position",0),
*(assign,"$setting_use_spearwall",1),*
(try_for_agents,":agent"),
(agent_set_slot,":agent",slot_agent_spearwall,0),
(agent_set_slot,":agent",slot_agent_x,0),
(agent_set_slot,":agent",slot_agent_y,0),
(agent_set_slot,":agent",slot_agent_z,0),
(agent_set_slot,":agent",slot_agent_speed,0),
(try_end),
])
Bolkonsky said:ZemplinTemplar said:Thanks, that did get rid of the problem, but the bracing doesn't work anyway.
I'm giving up on the code. It's impossible to implement properly and I get the feeling it will be semi-useless ingame. Thanks anyway.
I'm sorry to hear that. What missions did you add it to?
Bolkonsky said:Proves it. Maybe you can ask the creator ? Or someone who uses the code, and got it working, that did not do that? (Me, in case you can't figure it out.) So no, it's not needed for it to function.