Does anyone know how to restrict the target area for a German Nebelwerfer bonus?
It's for the Seelow Heights scenario -> viewtopic.php?f=313&t=55132
Right now, it's too easy for a clever German general to blast the Kustrin-Oder bridges, which are fragile and offer precious little cover...
Thanks!
GL88
Artillery bonus: How to restrict the target zone?
Moderators: Slitherine Core, BA Moderators
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Artillery bonus: How to restrict the target zone?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 9863
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Artillery bonus: How to restrict the target zone?
You would need to tweak the bonus script for it. You can do this by copying the script from CORE/BONUS into a local BONUS folder in your campaign. Then you can edit as you desire.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Artillery bonus: How to restrict the target zone?
Thanks Pip!pipfromslitherine wrote:You would need to tweak the bonus script for it. You can do this by copying the script from CORE/BONUS into a local BONUS folder in your campaign. Then you can edit as you desire.
Cheers
Pip
Looking in NEBELBATTERY.BSF, I guess the best place to put this is with...
Code: Select all
// tell us whether the drop menu item should display/be disabled. Anything >= 0 means show as normal
function CHECK_BONUS_NEBEL_BATTERY(tilex,tiley,unit)
{
return BonusCheck(tilex, tiley, unit, "Nebel") ;
}
(I want to prevent the Nebelbattery from targeting anything west of the y=65 line on my map)
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 9863
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Artillery bonus: How to restrict the target zone?
Yes. You can return -1 or -2. IIRC -1 means greyed out, -2 means don't show it at all.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Artillery bonus: How to restrict the target zone?
Thanks Pip,
Cool... I'll try this...
Does that sort of make sense? Or am I oversimplifying?
Cool... I'll try this...
Code: Select all
// tell us whether the drop menu item should display/be disabled. Anything >= 0 means show as normal
function CHECK_BONUS_NEBEL_BATTERY(tilex,tiley,unit)
{
ret = -1 // Grey out the Nebelwerfer by default
if (tiley) < 66 // Check if the cursor location is in an area where the Nebelwerfer is not restricted
{
return BonusCheck(tilex, tiley, unit, "Nebel") ; // if it's not restricted, let the targeting icon show
}
}
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Site Admin
- Posts: 9863
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Artillery bonus: How to restrict the target zone?
pretty much right - it would probably best be
{
int ret ;
ret = -1 ;
if(tiley < 66)
{
}
{
int ret ;
ret = -1 ;
if(tiley < 66)
{
}
follow me on Twitter here
-
- Site Admin
- Posts: 9863
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Artillery bonus: How to restrict the target zone?
pretty much right - it would probably best be
{
int ret ;
ret = -1 ;
if(tiley < 66)
{
ret = BonusCheck(tilex, tiley, unit, "Nebel") ;
}
return ret ;
}
But I am sure you would have worked out the syntax
Cheers
Pip
{
int ret ;
ret = -1 ;
if(tiley < 66)
{
ret = BonusCheck(tilex, tiley, unit, "Nebel") ;
}
return ret ;
}
But I am sure you would have worked out the syntax

Cheers
Pip
follow me on Twitter here
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Artillery bonus: How to restrict the target zone?
Awww, thanks Pip. That works great.pipfromslitherine wrote:pretty much right - it would probably best be
{
int ret ;
ret = -1 ;
if(tiley < 66)
{
ret = BonusCheck(tilex, tiley, unit, "Nebel") ;
}
return ret ;
}
But I am sure you would have worked out the syntax
Cheers
Pip
You're the best! Even better than Santa Claus...



SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347