Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...