FOnline Development > Questions and Answers
FOnline SDK - Question
wladimiiir:
Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
Gob:
--- Quote from: Mike Wall on May 10, 2013, 08:45:07 am ---Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
--- End quote ---
there are some blockers i think they are the blue ones check the readme
JovankaB:
--- Quote from: Mike Wall on May 10, 2013, 08:45:07 am ---Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
--- End quote ---
no
In theory you could make the glass wall unpickable, shootThru item and add a check in combat.fos if the item is between attacker and the attacked character (perhaps for optimization store somewhere boolean if such item in a map exists at all) - and make the attack fail, with some special effects, explosion if it's rocket etc. or make it as invisble hex marker with same function
Mayck:
--- Quote from: Mike Wall on May 10, 2013, 08:45:07 am ---Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
--- End quote ---
It actually is... there are two ways to do so:
1) either you write your own check_look function so it uses some other flag than ShootThru, however if you would want to do this it would be better to write native extension (put it in .dll). This one is a lot of work.
2) Using an engine glitch, which i am not sure if still works (last time i tried it was 2 years ago). This one is easier, but can be a pain in the ass to mantain (also note it was working only for static scenery and not items):
* Set ShootThru flag on your bullet-proof-glass scenery
* Start server and recompile all maps the bullet-proof-glass scenery is on... only maps which don't have their .fomapb equivalent should be recompiled (as far as i remember), or those which were recently edited, so you either need to delete .fomapb counterparts of those maps, or resave them in mapper before you start the server.
* Shut down Server
* Unset ShootThru flag on your bullet-proof-glass scenery
* Start server again.Downside of this is that (if it still works) you have to repeat these steps everytime you edit any map with bullet proof glass or somehow cause the maps recompilation by other means(like deleting its .fomapb counter-part).
wladimiiir:
Thanks very much. The 2nd solution looks like a hack to me, so I will skip that ;D
I was thinking about doing it as you proposed in 1st solution and I already have my own check_look function, so that should not be a problem to modify. But the problem I see in this is that, if I am not mistaken, FOV lines (Q) will be shown incorrectly as they are not using the custom check_look function to draw themselves (and as they are hardcoded I cannot do much there), or not?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version