heldenhammer 10 Posted November 12, 2016 Hi folks, hope you are able to provide some editing support to a newbie. Just need to switch off the light on a streetlamp, therefore I placed a game logic next to the object and tried the following but desperately failed. lamp1= [0,0,0] nearestObject 156352; lamp1 setHit ["light_1_hitpoint", 0.97]; also tried (object 156352) switchLight "OFF"; And yes, object 156352 is the correct id for the streetlamp, tried it with getneaerestobject setdamage 1 instruction and *magic* the lamp was destroyed Thanks for advice Share this post Link to post Share on other sites
killzone_kid 1332 Posted November 12, 2016 Is BIKI page somehow insufficient? https://community.bistudio.com/wiki/switchLight Share this post Link to post Share on other sites
heldenhammer 10 Posted November 12, 2016 Hi killzone_kid. Indeed, for me unfortunately it does not help at all. What I did, for testing purpose, I placed a game logic next to the lamp objet, placed also a player next to it, then I put in init line the following command with no result, the lihgt is still burning. lamp = nearestObject [player, "Lamps_base_F"]; lamp setHit ["light_1_hitpoint", 0.97]; Share this post Link to post Share on other sites
killzone_kid 1332 Posted November 12, 2016 Hi killzone_kid. Indeed, for me unfortunately it does not help at all. What I did, for testing purpose, I placed a game logic next to the lamp objet, placed also a player next to it, then I put in init line the following command with no result, the lihgt is still burning. lamp = nearestObject [player, "Lamps_base_F"]; lamp setHit ["light_1_hitpoint", 0.97]; Do copytoclipboard str getAllHitpointsDamage lamp and paste here the results Share this post Link to post Share on other sites
heldenhammer 10 Posted November 15, 2016 Sorry for the delayed response but real life kept me really busy. It was not before today that I had some quite minutes to continue working on the mission. [["HitBulb",""],["",""],[0,0]] This is the result I received after adding your command to the init line of my game logic. Does it helh in troube fixing? Can't deal with the command Hitbulb, even tried to search it in BI wiki but found no result. Any advice and explanation, please :-/ Share this post Link to post Share on other sites
soolie 189 Posted November 15, 2016 The command getallhitpointsdamage returns only the hitpoint "HitBulb" change lamp setHit ["light_1_hitpoint", 0.97]; to lamp setHit ["HitBulb", 0.97]; Share this post Link to post Share on other sites
killzone_kid 1332 Posted November 15, 2016 Sorry for the delayed response but real life kept me really busy. It was not before today that I had some quite minutes to continue working on the mission. [["HitBulb",""],["",""],[0,0]] This is the result I received after adding your command to the init line of my game logic. Does it helh in troube fixing? Can't deal with the command Hitbulb, even tried to search it in BI wiki but found no result. Any advice and explanation, please :-/ You can try lamp = nearestObject [player, "Lamps_base_F"]; lamp seHitpointDamage ["HitBulb", 0.97]; Share this post Link to post Share on other sites
heldenhammer 10 Posted November 15, 2016 Hi thanks for your support but it is getting ridiculous. This strange streetlamp is still burning even by trying both proposed solutions. Could it be that the expression Lamps_base_F is not the right identifier for that lamp object on map Celle2. Is there a ay to get the object name of map objects by only knowing the object id? Share this post Link to post Share on other sites
killzone_kid 1332 Posted November 16, 2016 Hi thanks for your support but it is getting ridiculous. This strange streetlamp is still burning even by trying both proposed solutions. Could it be that the expression Lamps_base_F is not the right identifier for that lamp object on map Celle2. Is there a ay to get the object name of map objects by only knowing the object id? try to kill the bulb by passing 1 instead of 0.97 Share this post Link to post Share on other sites
heldenhammer 10 Posted November 17, 2016 Not working :-( [["HitBulb",""],["",""],[0,0]] Any other ideas? Share this post Link to post Share on other sites
killzone_kid 1332 Posted November 17, 2016 Not working :-( [["HitBulb",""],["",""],[0,0]] Any other ideas? what happens if you lamp setHitIndex [0,1]; lamp setHitIndex [1,1]; hint str getAllHitpointsDamage lamp; Share this post Link to post Share on other sites
heldenhammer 10 Posted November 23, 2016 Thanks killzone_kid it is working fine. Hint is showing following line. [["HitBulb",""],["",""],[1,1]] For a better understanding, could you shortly explain to me what is happening on coding side? My final solution looks like this, lamp1 = [0,0,0] nearestObject 156353; lamp1 setHitIndex [0,1]; lamp1 setHitIndex [1,1]; Now I have an enemy occupied, dark village. This will be a nice surprise for the attacking forces :-) Share this post Link to post Share on other sites