Code_Man Posted June 24, 2018 Share Posted June 24, 2018 I tried creating a staticshape instance however for some reason it is indestructable despite having health and isinvincible attribute set properly.For the object i used same values as cheetah but i simply cannot destroy it.I skimmed over t3d code, documentations and forum already for answers.Would much appreciate any hints. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 24, 2018 Share Posted June 24, 2018 I have destructible objects in Uebergame, there is a hidden ability that allows you to place/build objects that can also be destroyed or collected again and placed somewhere else. Quote Link to comment Share on other sites More sharing options...
Code_Man Posted June 24, 2018 Author Share Posted June 24, 2018 I assume you refer to specials/platform.cs?I copied the whole datablock to see what happens, now there seems to be an explosion when i shoot enough but the object is still there. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 24, 2018 Share Posted June 24, 2018 Use it from within Uebergame it should work, it is part of an ability to build objects. I don't want to bother reconstructing how it works now. Quote Link to comment Share on other sites More sharing options...
Code_Man Posted June 24, 2018 Author Share Posted June 24, 2018 Assuming you meant 1.1.1.0?Same problem with your platform there.I can check the git version if you made any changes there.Guess that means we both have some things to figure out. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 24, 2018 Share Posted June 24, 2018 Well the issue is probably pretty simple.The ShapeCharge for example can be destroyed by shooting at it, then it will explode and be removed, this is done through the line"%obj.schedule(50, "delete");"in "function ShapeChargeDeployed::onDestroyed"So you have to see that you add a delete function on destroyed or spawn a destroyed shape. I think the platform disappears if you pick it up again, maybe for the case of destruction it was just forgotten to remove it from the world as well. Quote Link to comment Share on other sites More sharing options...
Code_Man Posted June 24, 2018 Author Share Posted June 24, 2018 I hadnt thought the shape charge could be destroyed, i think i tried at one point but maybe i screwed up.Also i found the actual error, the onDestroyed override i used had a check for renderWhenDestroyed set to true resulting in the OnDestroyed function not being called, same for your platform, assuming its not intentional.All in all it should have been obvious for me, but lesson learned and mission accomplished, thanks for the help. Quote Link to comment Share on other sites More sharing options...
Code_Man Posted June 25, 2018 Author Share Posted June 25, 2018 The reason i tried to make this is to introduce destructable objects and even objetive based gameplay to ubergame.Is there some reason uebergame doesnt have destructable objects builtin?I think it would add some good spice to the game.This is offtopic but since im on top of this section anyhow and the issue is closed better than making a new. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 25, 2018 Share Posted June 25, 2018 As said I have destructible objects, but I had no use for them yet, so I disabled them. Sure you can let players build objects, but this would require a lot more code to avoid ugly scenarios like objects floating around in the air or blocking things, since static objects are not rigid objects and rigid objects have their own issues, mostly performance. Quote Link to comment Share on other sites More sharing options...
Code_Man Posted June 25, 2018 Author Share Posted June 25, 2018 For now i just meant things like destructable walls and bridges and such that change the map a little to enable new tactics as the games on. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 25, 2018 Share Posted June 25, 2018 Most objects are not suitable for that, because they are either vegetation or important structures or objects that are too complex. You can try adding destructible objects and see how it works, but I do not see much potential yet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.