Hi, its me again, and this time with a really hard problem :D
The gameengine itself works this way : A unit is visible (because ANY unit of player 1 can see it), and can be attacked by any unit of Player 1, even if there is a cliffwall between them.
What i want (because i make a turn based taktik game like UFO or Jagged Alliance) is quite difficult. On the one hand, i need the "can attack if visible by any unit", because otherwise attacking a higher cliff level would be impossible. On the other hand, it would be neat to have somekind of "does less damage if not visible by attacker" effect. As it is for now, its really annoying, because high Range units can attack through walls as long as the units behind the wall are visible ...
Does anybody know a way to archieve this? (or does have a better idea :D)
Well you can make an switch effect for the attack so that it checks if an unit is visible or not.... but i'm not sure about those visible by any unit?!
Haven't seen something like this anywhere until jet...
Well it's kind of easy to do with triggers, basically you check for a unit attacking and then you check to see if the cliff level goes up and then down between the attacking unit and the attacked unit. Several ways to do that... the best would be using a for loop with something like:
Check cliff level of point with polar offset; angle = angle between attacking unit and attacked unit; radius = i * distance between units / max_i_value. If cliff level goes up, you set some boolean and then if it goes down, you Stop the attacking unit.
Sadly I am unsure how to do this via the data editor.
vision is player based, not unit based, so there is no validator for that, if you really want that you need to validate anything that could block vision and check every point from source to target for "anything"
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, its me again, and this time with a really hard problem :D
The gameengine itself works this way : A unit is visible (because ANY unit of player 1 can see it), and can be attacked by any unit of Player 1, even if there is a cliffwall between them.
What i want (because i make a turn based taktik game like UFO or Jagged Alliance) is quite difficult. On the one hand, i need the "can attack if visible by any unit", because otherwise attacking a higher cliff level would be impossible. On the other hand, it would be neat to have somekind of "does less damage if not visible by attacker" effect. As it is for now, its really annoying, because high Range units can attack through walls as long as the units behind the wall are visible ...
Does anybody know a way to archieve this? (or does have a better idea :D)
Bumb,
seems this has no solution :D
Well you can make an switch effect for the attack so that it checks if an unit is visible or not.... but i'm not sure about those visible by any unit?!
Haven't seen something like this anywhere until jet...
@Niemetz:
Well it's kind of easy to do with triggers, basically you check for a unit attacking and then you check to see if the cliff level goes up and then down between the attacking unit and the attacked unit. Several ways to do that... the best would be using a for loop with something like:
Check cliff level of point with polar offset; angle = angle between attacking unit and attacked unit; radius = i * distance between units / max_i_value. If cliff level goes up, you set some boolean and then if it goes down, you Stop the attacking unit.
Sadly I am unsure how to do this via the data editor.
Have you fixed your problem? Have the same and search around for solutions
I could be wrong but I seem to recall there being a line of sight validator.
You found solution? Line of sight validator? how do u create one like that?
vision is player based, not unit based, so there is no validator for that, if you really want that you need to validate anything that could block vision and check every point from source to target for "anything"