Jump to content
Sign in to follow this  
sphoenix

Making a building disappear

Recommended Posts

Hi everybody smile_o.gif

I would like to change Ixel's base purpose to change it into a tank base.

In order to do that I need to make the barracks disappear.

But there is one problem: using nearestObject, I can use setDammage (to verify my nearestObject syntax is correct) but setPos wouldn't work.

Is there any explanation? Another way maybe?

Thanks for the answers

SPhoenix

Share this post


Link to post
Share on other sites

As far as I know you can't change the height of a fixed island object (like with setpos).

I think the only thing you could do is destroy them.

Share this post


Link to post
Share on other sites

Thank you very much.

I will try to see if I can make the ruins disappear  rofl.gif

EDIT: <span style='color:red'>IT WORKS!</span>

In order to make a building disappear in the game you need to move the ruins created after the building destruction.

The only thing left will be a small explosion texture on the ground.

You need: a game logic named BLDG (or whatever) on the building you want to vanish.

Then:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Budova = nearestObject [BLDG, "Building"];

Budova setDammage 1;

~2

Budova1 = nearestObject [BLDG, "Building"];

Budova1 setPos [0,0,-100];

Now maybe doing a nearestObject again isn't necessary: but for one single line of code, better be safe than sorry smile_o.gif

Good game everyone.

SPhoenix

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×